3
我试图遍历与它这样的相关的散列和数组:使用Ansible Playbook可以与with_dict和with_nested一起循环吗?
VAR:
dictionary:
aword: [ ant, den ]
bword: [ fat, slim ]
任务:
name: Create symlinks
command: do something with item[0] over item[1]
with_nested:
- "{{ item.key }}"
- "{{ item.value }}"
with_dict: dictionary
这是行不通的。我做错了什么或Ansible不支持这种迭代?
我不知道使用的语法,但也许你可以看看过滤器[Combining diction白羊](http://docs.ansible.com/ansible/playbooks_filters.html#combining-hashes-dictionaries) – Michael