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 %} 

-- 
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/8fab0466-c136-4d14-a59b-ac241638cba8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to