Explore Courses Blog Tutorials Interview Questions
+2 votes
in DevOps and Agile by (50.2k points)

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

1 Answer

+2 votes
by (108k points)

You've made a small syntax error. 

yml files are very accurate 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

Browse Categories