I have the following vars inside my downloadable book. I got the following structure
domains: - { main: 'local1.com', sans: ['test.local1.com', 'test2.local.com'] } - { main: 'local3.com' } - { main: 'local4.com' }
And get the following inside my conf.j2
{% for domain in domains %} [[acme.domains]] {% for key, value in domain.iteritems() %} {% if value is string %} {{ key }} = "{{ value }}" {% else %} {{ key }} = {{ value }} {% endif %} {% endfor %} {% endfor %}
Now, when I go to the virtual machine and see the file, I get the following:
Exit
[[acme.domains]] main = "local1.com sans = [u'test.local1.com', u'test2.local.com'] [[acme.domains]] main = "local3.com" [[acme.domains]] main = "local4.com"
Note the u inside the sans array.
Released Out
[[acme.domains]] main = "local1.com" sans = ["test.local1.com", "test2.local.com"] [[acme.domains]] main = "local3.com" [[acme.domains]] main = "local4.com"
Why is this happening and how can I fix it?
Steve
source share