I use roles and testXX/group_vars/all to define a great many things for 
each environments.

I have to build xml files that contain two values at least in each 
iteration. The example below has pool1 and pool2, and within those pools we 
have server1, server2 etc. 

I can't get my head around how to template this, and how to define arrays 
in group_vars to work with the templates and/or playbook. I hope this makes 
sense.

<ftp-config>
    <pool>
        <name>pool1</name>
        <server>
            <name>server1</name>
            <host>hostname1</host>
            <root>/path/to/somewhere</root>
        </server>
        <server>
            <name>server3</name>
            <host>hostname2</host>
            <root>/path/to/somewhere</root>
        </server>
    </pool>
    <pool>
        <name>pool2</name>
        <server>
            <name>server2</name>
            <host>hostname3</host>
            <root>/path/to/somewhere</root>
        </server>
        <server>
            <name>server2</name>
            <host>hostname4</host>
            <root>/path/to/somewhere</root>
        </server>
    </pool>
</ftp-config>

I would like my all file to be something like
pools:
  - pool1
    - server1, hostname1
    - server3, hostname2
  - pool2
     - server2, hostname3
    etc


-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to