Hi, I would like to create dynamically some configuration files (the configs are used by tomcat) using a template based some variables from group_vars
Below is what I have - group_vars/test.yml file: - log4j - config log4j: log4j.rootCategory: INFO log4j.appender.SYSLOG: org.apache.log4j.net.SyslogAppender log4j.appender.SYSLOG.syslogHost: testhost jira: jira.soap.url: https://hostname jira.login.username: test jira.login.password: test14 - roles/test/main.yml - name: 'Configure the application properties' template: src: "template.j2" dest: "/tmp/{{ item }}.properties" owner: build group: build backup: yes with_items: "{{ file }}" - roles/test/template/template.j2 {% for key, value in {{ item.iteritems() }} %} {{ key }}= {{ value }} {% endfor %} So I would like to iterate every "file" and to create the files I'm receiving "msg": "AnsibleError: template error while templating string: expected token ':', got '}'. String: ## File managed by ansible ##\n\n{{ item }}\n{{ propertyfiles }}\n\n{% for i in {{ propertyfiles }} %}\n {% for key, value in i.items() %}\n {{ key }}= {{ value }}\n {% endfor %} \n{% endfor %} \n"} -- 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/0148b329-182d-437c-a7e4-8d6a4cbcbd11%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.