Unfortunately, I may have made the example too simple. The actual inventory
file has more groups and not all the groups are just locations.
Furthermore, the group names are not necessarily the same as the "loc_name"
variable. For example, in addition to the location groups, we could have
groups like:
[master-server]
server4
[loadbalancer]
server6
Which should not show up in the breakdown.
Thanks.
On Wednesday, March 18, 2015 at 8:40:18 PM UTC-4, Brian Coca wrote:
>
> you have all the locations in the groups dictionary and you can get
> the number of hosts by looking at the length of each group's host
> list.
>
> {% for loc in groups %}
> {{loc +': ' + groups[loc]|length,}}
> ...
>
>
>
>
> --
> Brian Coca
>
--
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/fa4dff25-75e2-43aa-b348-91d4656c0edc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.