Hi --
There's a bug either in the YAML parser or the lineinfile module (or the
documentation), I'm not sure exactly what the problem is. This example
from the docs:
- lineinfile: dest=/etc/sudoers state=present regexp='^%wheel'
line='%wheel ALL=(ALL) NOPASSWD: ALL'
fails with:
ERROR: Syntax Error while loading YAML script,
/export/tools/ops/ansible/roles/common/tasks/main.yml
Note: The error may actually appear before this position: line 34,
column 95
The line 34, column 95 is the colon after NOPASSWD:
If this isn't a known issue, I'm happy to file a github issue. In the
meantime, any ideas for a workaround? Single quotes, loading the value
from a variable, and \: don't fix the problem. Interestingly (well, to
me), a colon in the regexp statement does not cause an error.
Thanks.
k.