Hi,
I've recently updated from 1.9.1 to 2.0.2.0. I use the template module a
lot to build configs for my app. After updating, when I generate my
templates, the data structure variables are being rendered as unicode
strings.
Versions:
ansible 2.0.2.0
PyYAML==3.11
Jinja2==2.8
Example:
File with variables:
---
my_list:
- var1
Template file:
app.config.j2
'MYLIST': '{{my_list}}'
ansible command:
ansible localhost -m template -a "src=app.config.j2 dest=/tmp/app.config"
Contents of app.config:
'MYLIST': '[u'var1']'
What I used to get: (Version 1.9.1)
'MYLIST': '['var1']'
If I change my env file to be a string, then the file gets generated how it
used to be.
---
my_list: "['var1']"
This also happens when I try creating dictionaries and nested dictionaries.
Any ideas on what could be causing this, or how I can fix it?
TIA,
Henry
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/70e17746-cf11-4023-b1ad-83939d925af2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.