Dear all,
I have defined a var which contains some special characters (actually, a password in a vault).
Let’s assume the vault contains :
`
myPasswd: foo@bar
`
There is no problem when creating the encrypted file.
When I use it somewhere in a playbook, for example :
`
password: “{{ myPasswd }}”
`
I get the error message in the subject :
jinja2 templating error : template error while templating string: unexpected char ‘@’ at 5. String: {{foo@bar
}}"
So, though the var is encrypted in the vault (and can be correctl decrypted when viewing or editing), and is actually decrypted when used, it cannot be “jinja2 evaluated”.
Note that when removing such a character (! has the same problem, and I often use it in passwords), there is no more problem and the var is correctly set and used.
It is clear not a vault problem.
Could it be a bug around jinja2 templating, or is there something to use in order to escape such characters ?
Thanks for your help !
Best Regards
J-L