
Escaping Ansible variables
July 11, 2016
Recently a customer asked me to help him debug an Ansible Playbook that was throwing a very generic error that was not helping at all. The error was:
ERROR! Syntax Error while loading YAML.
As soon as I saw the error, I already guessed which problems could trigger such error: it’s either a bad usage of spaces, a badly escaped column within a value, or a variable escaping problem.
With a couple of grep
runs, I identified it as the variable escaping problem.