Ansible,带有循环项问题

Ansible,带有循环项问题,ansible,Ansible,我对项目的使用有问题(与_项目) 我不希望在我的物品中使用特定的价值。blabla[X],但我在互联网上没有为这种用途提供资金 剧本: with_items: - "{{ ssh_users }}" when: "item.cluster[0] in group_names" ssh_用户示例: - firstname: "toto" separator: "." separator_git: " " lastname: "toto" editor: "/usr/bin/emacs

我对项目的使用有问题(与_项目) 我不希望在我的物品中使用特定的价值。blabla[X],但我在互联网上没有为这种用途提供资金

剧本:

with_items:
    - "{{ ssh_users }}"
  when: "item.cluster[0] in group_names"
ssh_用户示例:

- firstname: "toto"
separator: "."
separator_git: " "
lastname: "toto"
editor: "/usr/bin/emacs"
state: "present"
user: "toto"
cluster:
          - stag
          - utils
库存:

[cluster_media]
preprod ansible_connection=local ansible_hostname=localhost
preprodbis ansible_connection=local ansible_hostname=localhost

[cluster_box]
myboxpp ansible_connection=local ansible_hostname=localhost

[cluster_utils]
mypreprod54 ansible_connection=local ansible_hostname=localhost

[stag:children]
cluster_media

[utils:children]
cluster_utils
我想在我的剧本中更改item.cluster[0]中的0,以允许任务进入item.cluster[2]和所有可能的集群。
感谢您的帮助

我将
与_subelements:
一起使用,它工作得非常好