mirror of https://github.com/ceph/ceph-ansible.git
37 lines
977 B
YAML
37 lines
977 B
YAML
---
|
|
- name: set config and keys paths
|
|
set_fact:
|
|
rgw_config_keys:
|
|
- "/var/lib/ceph/radosgw/{{ ansible_hostname }}/keyring"
|
|
when: nfs_obj_gw
|
|
|
|
- name: wait for rgw keyring
|
|
wait_for: path="/var/lib/ceph/radosgw/{{ ansible_hostname }}/keyring"
|
|
when:
|
|
- nfs_obj_gw
|
|
- inventory_hostname == groups.rgws[0]
|
|
|
|
- name: stat for config and keys
|
|
local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
|
|
with_items: "{{ rgw_config_keys }}"
|
|
changed_when: false
|
|
become: false
|
|
failed_when: false
|
|
register: statconfig
|
|
when:
|
|
- nfs_obj_gw
|
|
- inventory_hostname == groups.rgws[0]
|
|
|
|
- name: push ceph files to the ansible server
|
|
fetch:
|
|
src: "{{ item.0 }}"
|
|
dest: "{{ fetch_directory }}/docker_mon_files/var/lib/ceph/radosgw/keyring"
|
|
flat: yes
|
|
with_together:
|
|
- "{{ rgw_config_keys }}"
|
|
- "{{ statconfig.results }}"
|
|
when:
|
|
- nfs_obj_gw
|
|
- item.1.stat.exists == false
|
|
- inventory_hostname == groups.rgws[0]
|