Issue creating AWS VPC with Ansible

0 votes

I am getting this error -

 ~]$ ansible-playbook -i ./hosts create-vpc.yml
ERROR! Syntax Error while loading YAML.
  did not find expected key
Mar 27, 2018 in Ansible by Atul
• 10,240 points
1,265 views

2 answers to this question.

0 votes

Check the indentation of your YAML file

Or

- name: To set up internet gateway hosts: local tasks: - name: creating vpc ec2_vpc: region: us-east-1 state: present cidr_block: 20.0.0.0/16 resource_tags: { "Name":"Test" } register: vpc

answered Mar 27, 2018 by DragonLord999
• 8,450 points
0 votes
You can use the details given in the following link:-

https://docs.ansible.com/ansible/2.5/modules/ec2_vpc_module.html
answered Aug 16, 2018 by Priyaj
• 58,020 points

Related Questions In Ansible

0 votes
1 answer

Ansible with AWS Parameter store

Hey @Dipti, have a look at the ...READ MORE

answered Mar 24, 2019 in Ansible by Rhea
967 views
0 votes
1 answer

Ansible Playbook for Creating a VM with OS and multiple data managed disks

Hey @Ammie, Try a playbook something like ...READ MORE

answered Mar 27, 2019 in Ansible by Stark
1,495 views
0 votes
1 answer

ansible ssh and user module issue with edureka VM

Hi@Konakanchl, I guess you need to give your ...READ MORE

answered Jul 23, 2020 in Ansible by akhtar
• 38,260 points
2,820 views
0 votes
1 answer

How to create VPC in AWS from Ansible controller node?

Hi@akhtar, You can find one module named ec2_vpc ...READ MORE

answered Aug 13, 2020 in Ansible by MD
• 95,460 points
922 views
0 votes
1 answer

How to create an Elastic Load Balancer in AWS with Ansible Playbook?

Hi@akhtar, You can find one module in ansible ...READ MORE

answered Oct 12, 2020 in Ansible by MD
• 95,460 points
1,197 views
0 votes
1 answer

How to configure the Nginx server in AWS with Ansible Playbook?

Hi@akhtar, To configure the Nginx server in AWS, ...READ MORE

answered Oct 12, 2020 in Ansible by MD
• 95,460 points
3,038 views
0 votes
1 answer

permissions related to AWS ECR

if you add allowContainerRegistry: true, kops will add those permissions ...READ MORE

answered Oct 9, 2018 in Kubernetes by Kalgi
• 52,350 points
1,402 views
+1 vote
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP