I have an Ansible inventory file, with a group that contains roughly 20 children groups. I want to return the list of children so I started with:
{% for group in groups[maingroup] %}
{{ group }}
{% endfor %}
Next, how can I add next to the group its length, comma separated?
I was thinking something like this would work but it doesn't:
{{ group|join(',', attribute='length') }}
Ideal output would be:
group_A,3
group_B,12
group_C,26