distribute rbd bootstrap key if available

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
pull/1625/head
Jason Dillaman 2017-08-11 08:31:55 -04:00
parent 1ac0969c28
commit 70c2b934ca
6 changed files with 26 additions and 0 deletions

View File

@ -17,3 +17,4 @@
- /var/lib/ceph/bootstrap-rgw
- /var/lib/ceph/bootstrap-mds
- /var/lib/ceph/bootstrap-osd
- /var/lib/ceph/bootstrap-rbd

View File

@ -1,4 +1,9 @@
---
- name: register rbd bootstrap key
set_fact:
bootstrap_rbd_keyring: "/var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring"
when: ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous
- name: set config and keys paths
set_fact:
ceph_config_keys:
@ -9,6 +14,7 @@
- /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring
- "{{ bootstrap_rbd_keyring | default([]) }}"
- name: stat for ceph config and keys
stat:

View File

@ -11,3 +11,4 @@
- /var/lib/ceph/bootstrap-osd
- /var/lib/ceph/bootstrap-mds
- /var/lib/ceph/bootstrap-rgw
- /var/lib/ceph/bootstrap-rbd

View File

@ -1,4 +1,9 @@
---
- name: register rbd bootstrap key
set_fact:
bootstrap_rbd_keyring: "/var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring"
when: ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous
- name: set config and keys paths
set_fact:
ceph_config_keys:
@ -8,6 +13,7 @@
- /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring
- "{{ bootstrap_rbd_keyring | default([]) }}"
- name: add mgr keys to config and keys paths
set_fact:

View File

@ -14,6 +14,11 @@
with_items:
- "{{ ceph_keys.stdout_lines }}"
- name: register rbd bootstrap key
set_fact:
bootstrap_rbd_keyring: "/var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring"
when: ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous
- name: copy keys to the ansible server
fetch:
src: "{{ item }}"
@ -25,3 +30,4 @@
- "/var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring"
- "/var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring"
- "/var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring"
- "{{ bootstrap_rbd_keyring | default([]) }}"

View File

@ -114,6 +114,11 @@
- "{{ ceph_keys.get('stdout_lines') | default([]) }}"
when: cephx
- name: register rbd bootstrap key
set_fact:
bootstrap_rbd_keyring: "/var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring"
when: ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous
- name: copy keys to the ansible server
fetch:
src: "{{ item }}"
@ -124,6 +129,7 @@
- /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring
- "{{ bootstrap_rbd_keyring | default([]) }}"
when:
- cephx
- "{{ inventory_hostname == groups[mon_group_name] | last }}"