diff --git a/roles/ceph-common/tasks/create_ceph_initial_dirs.yml b/roles/ceph-common/tasks/create_ceph_initial_dirs.yml index 49db42d43..46682b69f 100644 --- a/roles/ceph-common/tasks/create_ceph_initial_dirs.yml +++ b/roles/ceph-common/tasks/create_ceph_initial_dirs.yml @@ -17,3 +17,4 @@ - /var/lib/ceph/bootstrap-rgw - /var/lib/ceph/bootstrap-mds - /var/lib/ceph/bootstrap-osd + - /var/lib/ceph/bootstrap-rbd diff --git a/roles/ceph-docker-common/tasks/checks.yml b/roles/ceph-docker-common/tasks/checks.yml index 7ed5ac462..ae0ced2cc 100644 --- a/roles/ceph-docker-common/tasks/checks.yml +++ b/roles/ceph-docker-common/tasks/checks.yml @@ -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: diff --git a/roles/ceph-docker-common/tasks/dirs_permissions.yml b/roles/ceph-docker-common/tasks/dirs_permissions.yml index 4c174d751..e15dea958 100644 --- a/roles/ceph-docker-common/tasks/dirs_permissions.yml +++ b/roles/ceph-docker-common/tasks/dirs_permissions.yml @@ -11,3 +11,4 @@ - /var/lib/ceph/bootstrap-osd - /var/lib/ceph/bootstrap-mds - /var/lib/ceph/bootstrap-rgw + - /var/lib/ceph/bootstrap-rbd diff --git a/roles/ceph-docker-common/tasks/fetch_configs.yml b/roles/ceph-docker-common/tasks/fetch_configs.yml index a432a7ea2..805a81799 100644 --- a/roles/ceph-docker-common/tasks/fetch_configs.yml +++ b/roles/ceph-docker-common/tasks/fetch_configs.yml @@ -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: diff --git a/roles/ceph-fetch-keys/tasks/main.yml b/roles/ceph-fetch-keys/tasks/main.yml index b5e2ad7b3..ecce0028f 100644 --- a/roles/ceph-fetch-keys/tasks/main.yml +++ b/roles/ceph-fetch-keys/tasks/main.yml @@ -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([]) }}" diff --git a/roles/ceph-mon/tasks/ceph_keys.yml b/roles/ceph-mon/tasks/ceph_keys.yml index 7b50ead6f..4677e950c 100644 --- a/roles/ceph-mon/tasks/ceph_keys.yml +++ b/roles/ceph-mon/tasks/ceph_keys.yml @@ -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 }}"