Hi, I have an inventory file set up like this: [loc1] server1 server2
[loc1:vars] loc_name="location1" [loc2] server3 [loc2:vars] loc_name="location2" [loc3] server4 server5 server6 [loc3:vars] loc_name="location3" I want to create a configuration file on all the servers containing all the different locations and the number of members in each location. Example: location1: 2, location2: 1, location3: 3 The number of different loc_names can vary. Is there a simple Jinja2 template that can yield those results? I'm worried that I'm approaching this from the wrong angle or that I set up the inventory in a way that is anti-Ansible; I want to avoid creating a convoluted template file if at all possible. Any suggestions? Thanks! -- 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/e05f9b3b-01c1-4101-84ce-7cb3c1b47db1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
