Ansible YML Playbook Syntax Check

$ ansible-playbook debug.yml --syntax-check
ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
JSON: No JSON object could be decoded

Syntax Error while loading YAML.
  mapping values are not allowed in this context

The error appears to be in '/home/ec2-user/ansible/debug.yml': line 8, column 14, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

    - name: This command will show ip
        shell:
             ^ here

Comments