Hello,
I'd like to loop over all hosts that are in scope of the current task in
a template.
Currently I use a fixed groupname as seen in the following block, but
that will break if the scope doesn't match the groupname.
Is there a way to say loop over all hosts in scope of current task?
{% for host in groups['groupname'] %}
{% for item in hostvars[host]['varfoo']['results'] -%}$
{{ item.stdout }},
{%- endfor %}
{% endfor %}
thanks,
Nusenu