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

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ef022781-a5a0-464e-ad74-daaa3ca957f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to