I'm building a couple of roles where I need to give the config the IP addresses of all hosts in a specified group as a comma separated string.
Is there a jinja2 combination of filters (like map, match, select, join etc) that produce the same as this:
{% set comma = joiner(",") %}
{% for hostname in groups['mongodb'] %}
{{ comma() }}{{ hostvars[hostname].ansible_default_ipv4.address }}
{%- endfor %}