Problem scenario
You are trying to run an Ansible playbook with the “become: yes” stanza. You get this error after your ansible-playbook command:
“ERROR! Syntax Error while loading YAML.
expected <block end>, but found ‘-‘
The error appears to have been in ‘/home/cooluser/good.yaml’: line 4, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
…