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
18 views

1 answer to this question.

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
+1 vote
1 answer