Syntax Error while loading YAML. found unknown escape character
The error appears to be in line 111, column 25, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
set_fact: rollback: " {{ reg3['user_input'] }} " ^ here We could be wrong, but this one looks like it might be an issue with missing quotes. Always quote template expression brackets when they start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
After upgrading ansible version to ansible 2.9.17 and python version to python version = 3.6.8 this syntax error is coming
- set_fact:
reg2: "{{ reg1.stdout[0] }}"
- set_fact:
desc: " {{ reg2.split(\" \")[-1] }} "
- pause:
prompt: "confirm Y/N:"
register: reg3
- set_fact:
rollback: " {{ reg3[\'user_input\'] }} "