Error saying "ERROR: ec2_vpc_subnet is not a legal parameter of an Ansible Play"

0 votes

I'm trying to create a subnet using an existing VPC. This is my playbook:

---
  - hosts: local
    connection: local
    tasks:
      - name: Create subnet
        ec2_vpc_subnet:
          state: present
          vpc_id: vpc-abcd
          cidr: 10.0.3.0/24
          resource_tags:
            Name: Database Subnet
        register: database_subnet

error:

ERROR: ec2_vpc_subnet is not a legal parameter of an Ansible Play
Feb 8 in Ansible by Neel
12 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

ec2_vpc_subnet is support from Ansible version 2.0 and if you are using < 2.0 version, this won't work for you.

Update your version

sudo apt update ansible
answered Feb 8 by Dee

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.