Ansible playbooks loop使用详解
在一个task中循环某个操作
- name: "Modify key file permissions"
file:
path: "{{ ceph_conf_dir }}/ceph.client.admin.keyring"
mode: 0644
delegate_to: "{{ item }}"
loop: "{{ groups['ceph-cluster'] }}"
- name: "Modify key file permissions"
file:
path: "{{ ceph_conf_dir }}/ceph.client.admin.keyring"
mode: 0644
delegate_to: "{{ item }}"
loop: "{{ groups['ceph-cluster'] }}"