2016-05-06 02:20:03 +08:00
|
|
|
---
|
2018-04-17 21:32:53 +08:00
|
|
|
- name: set_fact admin_keyring
|
|
|
|
set_fact:
|
|
|
|
admin_keyring:
|
|
|
|
- "/etc/ceph/{{ cluster }}.client.admin.keyring"
|
|
|
|
when:
|
|
|
|
- copy_admin_key
|
|
|
|
|
|
|
|
- name: set_fact ceph_config_keys
|
|
|
|
set_fact:
|
|
|
|
ceph_config_keys:
|
|
|
|
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
|
|
|
|
|
|
|
|
- name: merge ceph_config_keys and admin_keyring
|
|
|
|
set_fact:
|
|
|
|
ceph_config_keys: "{{ ceph_config_keys + admin_keyring }}"
|
|
|
|
when:
|
|
|
|
- copy_admin_key
|
|
|
|
|
|
|
|
- name: stat for config and keys
|
2018-11-01 19:50:31 +08:00
|
|
|
stat:
|
2018-04-17 21:32:53 +08:00
|
|
|
path: "{{ fetch_directory }}/{{ fsid }}/{{ item }}"
|
2018-11-01 19:50:31 +08:00
|
|
|
delegate_to: localhost
|
2018-04-17 21:32:53 +08:00
|
|
|
with_items: "{{ ceph_config_keys }}"
|
|
|
|
changed_when: false
|
|
|
|
become: false
|
|
|
|
failed_when: false
|
|
|
|
check_mode: no
|
|
|
|
register: statconfig
|
|
|
|
|
|
|
|
- name: try to fetch config and keys
|
|
|
|
copy:
|
|
|
|
src: "{{ fetch_directory }}/{{ fsid }}/{{ item.0 }}"
|
|
|
|
dest: "{{ item.0 }}"
|
|
|
|
owner: "64045"
|
|
|
|
group: "64045"
|
|
|
|
mode: 0644
|
2017-09-11 16:54:03 +08:00
|
|
|
changed_when: false
|
2018-04-17 21:32:53 +08:00
|
|
|
with_together:
|
|
|
|
- "{{ ceph_config_keys }}"
|
|
|
|
- "{{ statconfig.results }}"
|
2017-09-19 22:19:14 +08:00
|
|
|
when:
|
2018-11-01 21:02:55 +08:00
|
|
|
- item.1.stat.exists
|
2017-10-10 18:43:23 +08:00
|
|
|
|
|
|
|
- name: create dbus service file
|
|
|
|
become: true
|
2017-10-30 17:20:01 +08:00
|
|
|
copy:
|
|
|
|
src: "org.ganesha.nfsd.conf"
|
2017-10-10 18:43:23 +08:00
|
|
|
dest: /etc/dbus-1/system.d/org.ganesha.nfsd.conf
|
|
|
|
owner: "root"
|
|
|
|
group: "root"
|
|
|
|
mode: "0644"
|
|
|
|
when:
|
|
|
|
- ceph_nfs_dynamic_exports
|
|
|
|
|
|
|
|
- name: reload dbus configuration
|
|
|
|
command: "killall -SIGHUP dbus-daemon"
|
|
|
|
when:
|
|
|
|
- ceph_nfs_dynamic_exports
|