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
|
2017-03-24 14:40:15 +08:00
|
|
|
- inventory_hostname == groups[rgw_group_name][0]
|
2016-07-21 21:17:19 +08:00
|
|
|
|
|
|
|
- name: stat for config and keys
|
|
|
|
local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
|
2016-11-03 17:16:33 +08:00
|
|
|
with_items: "{{ rgw_config_keys }}"
|
2016-07-21 21:17:19 +08:00
|
|
|
changed_when: false
|
|
|
|
become: false
|
|
|
|
failed_when: false
|
2016-11-27 21:27:28 +08:00
|
|
|
always_run: true
|
2016-07-21 21:17:19 +08:00
|
|
|
register: statconfig
|
|
|
|
when:
|
2016-08-18 20:24:48 +08:00
|
|
|
- nfs_obj_gw
|
2017-03-24 14:40:15 +08:00
|
|
|
- inventory_hostname == groups[rgw_group_name][0]
|
2016-07-21 21:17:19 +08:00
|
|
|
|
|
|
|
- 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:
|
2016-11-03 17:16:33 +08:00
|
|
|
- "{{ rgw_config_keys }}"
|
|
|
|
- "{{ statconfig.results }}"
|
2016-07-21 21:17:19 +08:00
|
|
|
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
|
2017-03-24 14:40:15 +08:00
|
|
|
- inventory_hostname == groups[rgw_group_name][0]
|