2016-02-18 06:15:57 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Lookup keys in /etc/ceph
|
|
|
|
ansible.builtin.shell: ls -1 /etc/ceph/*.keyring
|
2016-02-18 06:15:57 +08:00
|
|
|
changed_when: false
|
|
|
|
register: ceph_keys
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Create a local fetch directory if it does not exist
|
|
|
|
ansible.builtin.file:
|
2020-11-26 17:48:49 +08:00
|
|
|
path: "{{ fetch_directory }}"
|
2020-10-06 13:53:06 +08:00
|
|
|
state: directory
|
2024-02-14 18:14:02 +08:00
|
|
|
mode: "0755"
|
2020-10-06 13:53:06 +08:00
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
2016-02-18 06:15:57 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Copy ceph user and bootstrap keys to the ansible server
|
|
|
|
ansible.builtin.fetch:
|
2016-02-18 06:15:57 +08:00
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "{{ fetch_directory }}/{{ fsid }}/{{ item }}"
|
2024-02-14 18:14:02 +08:00
|
|
|
flat: true
|
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"
|
2019-08-23 02:29:40 +08:00
|
|
|
- "/var/lib/ceph/bootstrap-mgr/{{ cluster }}.keyring"
|