diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 24ae3356c..2b90a9f40 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -211,10 +211,23 @@ become: True pre_tasks: - - name: get current fsid + - name: non container - get current fsid command: "ceph --cluster {{ cluster }} fsid" - register: cluster_uuid + register: cluster_uuid_non_container delegate_to: "{{ groups[mon_group_name][0] }}" + when: + - not containerized_deployment + + - name: container - get current fsid + command: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} fsid" + register: cluster_uuid_container + delegate_to: "{{ groups[mon_group_name][0] }}" + when: + - containerized_deployment + + - name: set_fact ceph_cluster_fsid + set_fact: + ceph_cluster_fsid: "{{ cluster_uuid_container.stdout if containerized_deployment else cluster_uuid_non_container.stdout }}" - name: non container | create ceph mgr keyring(s) command: "ceph --cluster {{ cluster }} auth get-or-create mgr.{{ hostvars[item]['ansible_hostname'] }} mon 'allow profile mgr' osd 'allow *' mds 'allow *' -o /etc/ceph/{{ cluster }}.mgr.{{ hostvars[item]['ansible_hostname'] }}.keyring" @@ -243,7 +256,7 @@ - name: fetch ceph mgr key(s) fetch: src: "{{ ceph_conf_key_directory }}/{{ cluster }}.mgr.{{ hostvars[item]['ansible_hostname'] }}.keyring" - dest: "{{ fetch_directory }}/{{ fsid }}/{{ ceph_conf_key_directory }}/" + dest: "{{ fetch_directory }}/{{ ceph_cluster_fsid }}/{{ ceph_conf_key_directory }}/" flat: yes fail_on_missing: no delegate_to: "{{ groups[mon_group_name][0] }}"