2016-02-18 06:15:57 +08:00
|
|
|
---
|
2018-09-27 22:29:22 +08:00
|
|
|
- name: lookup keys in /etc/ceph
|
2016-02-18 06:15:57 +08:00
|
|
|
shell: ls -1 /etc/ceph/*.keyring
|
|
|
|
changed_when: false
|
|
|
|
register: ceph_keys
|
|
|
|
|
2020-10-06 13:53:06 +08:00
|
|
|
- name: create a local fetch directory if it does not exist
|
|
|
|
file:
|
|
|
|
path: "{{ fetch_directory | default('fetch/') }}"
|
|
|
|
state: directory
|
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
2016-02-18 06:15:57 +08:00
|
|
|
|
2018-09-27 22:29:22 +08:00
|
|
|
- name: "copy ceph user and bootstrap keys to the ansible server in {{ fetch_directory }}/{{ fsid }}/"
|
2016-02-18 06:15:57 +08:00
|
|
|
fetch:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "{{ fetch_directory }}/{{ fsid }}/{{ item }}"
|
|
|
|
flat: yes
|
2018-09-27 22:29:22 +08:00
|
|
|
fail_on_missing: false
|
2016-02-18 06:15:57 +08:00
|
|
|
run_once: true
|
|
|
|
with_items:
|
|
|
|
- "{{ ceph_keys.stdout_lines }}"
|
2016-10-07 14:06:21 +08:00
|
|
|
- "/var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring"
|
|
|
|
- "/var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring"
|
|
|
|
- "/var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring"
|
2018-10-11 03:24:22 +08:00
|
|
|
- "/var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring"
|
2018-09-27 22:29:22 +08:00
|
|
|
- "/var/lib/ceph/bootstrap-mgr/{{ cluster }}.keyring"
|