2016-07-21 21:17:19 +08:00
|
|
|
---
|
|
|
|
- name: set config and keys paths
|
|
|
|
set_fact:
|
|
|
|
rgw_config_keys:
|
|
|
|
- "/var/lib/ceph/radosgw/{{ ansible_hostname }}/keyring"
|
2016-08-18 20:24:48 +08:00
|
|
|
when: nfs_obj_gw
|
2016-07-21 21:17:19 +08:00
|
|
|
|
|
|
|
- name: wait for rgw keyring
|
|
|
|
wait_for: path="/var/lib/ceph/radosgw/{{ ansible_hostname }}/keyring"
|
|
|
|
when:
|
2016-08-18 20:24:48 +08:00
|
|
|
- nfs_obj_gw
|
2016-07-21 21:17:19 +08:00
|
|
|
- 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:
|
2016-08-18 20:24:48 +08:00
|
|
|
- nfs_obj_gw
|
2016-07-21 21:17:19 +08:00
|
|
|
- inventory_hostname == groups.rgws[0]
|
|
|
|
|
|
|
|
- name: push ceph files to the ansible server
|
|
|
|
fetch:
|
|
|
|
src: "{{ item.0 }}"
|
2016-08-26 08:37:57 +08:00
|
|
|
dest: "{{ fetch_directory }}/docker_mon_files/var/lib/ceph/radosgw/keyring"
|
2016-07-21 21:17:19 +08:00
|
|
|
flat: yes
|
|
|
|
with_together:
|
|
|
|
- rgw_config_keys
|
|
|
|
- statconfig.results
|
|
|
|
when:
|
2016-08-18 20:24:48 +08:00
|
|
|
- nfs_obj_gw
|
2016-08-24 15:30:05 +08:00
|
|
|
- item.1.stat.exists == false
|
2016-07-21 21:17:19 +08:00
|
|
|
- inventory_hostname == groups.rgws[0]
|