Error saying mapping values are not allowed in this context while executing an ansible playbook

0 votes

Hey I'm trying to execute a playbook but I get the following error:

ERROR! Syntax Error while loading YAML.
  mapping values are not allowed in this context
The error appears to have been in '/home/ubuntu/launch.yml': line 34, column 25, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
            volume_type: gp2
             volume_size: 8
                        ^ here
Jan 21, 2019 in Ansible by Nishit
15,930 views

1 answer to this question.

0 votes

Hey, @Nishit seems like you've made a small syntax error. 

yml files are very particular about the indentations and the spacing. The error log itself is showing you the where you've gone wrong 

Remove a space before volume-size: 8

It should be like this:

volume_type: gp2
volume_size: 8
answered Jan 21, 2019 by Emily

Related Questions In Ansible

0 votes
1 answer
0 votes
2 answers
0 votes
1 answer

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

ec2_vpc_subnet is support from Ansible version 2.0 and ...READ MORE

answered Feb 8, 2019 in Ansible by Dee
1,073 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,990 views
+2 votes
1 answer
+1 vote
1 answer
0 votes
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