with 專案 - 字典
你可以使用字典來進行稍微複雜的迴圈。
- name: manage packages
package: name={{ item.name }} state={{ item.state }}
with_items:
- { name: tree, state: present }
- { name: nmap, state: present }
- { name: apache2, state: absent }
你可以使用字典來進行稍微複雜的迴圈。
- name: manage packages
package: name={{ item.name }} state={{ item.state }}
with_items:
- { name: tree, state: present }
- { name: nmap, state: present }
- { name: apache2, state: absent }