mirror of https://github.com/ceph/ceph-ansible.git
28 lines
891 B
YAML
28 lines
891 B
YAML
---
|
|
- name: lookup keys in /etc/ceph
|
|
shell: ls -1 /etc/ceph/*.keyring
|
|
changed_when: false
|
|
register: ceph_keys
|
|
|
|
- name: create a local fetch directory if it does not exist
|
|
file:
|
|
path: "{{ fetch_directory | default('fetch/') }}"
|
|
state: directory
|
|
delegate_to: localhost
|
|
become: false
|
|
|
|
- name: "copy ceph user and bootstrap keys to the ansible server in {{ fetch_directory }}/{{ fsid }}/"
|
|
fetch:
|
|
src: "{{ item }}"
|
|
dest: "{{ fetch_directory }}/{{ fsid }}/{{ item }}"
|
|
flat: yes
|
|
fail_on_missing: false
|
|
run_once: true
|
|
with_items:
|
|
- "{{ ceph_keys.stdout_lines }}"
|
|
- "/var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring"
|
|
- "/var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring"
|
|
- "/var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring"
|
|
- "/var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring"
|
|
- "/var/lib/ceph/bootstrap-mgr/{{ cluster }}.keyring"
|