On Wed, 2 Sep 2020 07:17:42 -0700 (PDT)
Xinhuan Zheng <xinhuan.zh...@gmail.com> wrote:

> ... if I want to reference all hosts in a 
> group, should I use
>
> {% for host in groups[group] %}

If "group" is the name of the group then use

  {% for host in groups['group'] %}

or, simply

  {% for host in groups.group %}

If "group" is the variable with the name of the group use

  {% for host in groups[group] %}


-- 
Vladimir Botka

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20200902174531.1626a673%40gmail.com.

Attachment: pgpSPtXVVOIBM.pgp
Description: OpenPGP digital signature

Reply via email to