]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fix undefined running_mon
authorDmitriy Rabotyagov <noonedeadpunk@ya.ru>
Thu, 16 Jan 2020 18:23:58 +0000 (20:23 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Thu, 16 Jan 2020 23:28:12 +0000 (18:28 -0500)
Since commit [1] running_mon introduced, it can be not defined
which results in fatal error [2]. This patch defines default value which
was used before patch [1]

Signed-off-by: Dmitriy Rabotyagov <drabotyagov@vexxhost.com>
[1] https://github.com/ceph/ceph-ansible/commit/8dcbcecd713b0cd7769d3b4d04ef5c2f15881377
[2] https://zuul.opendev.org/t/openstack/build/c82a73aeabd64fd583694ed04b947731/log/job-output.txt#14011

(cherry picked from commit 2478a7b94856fc1b4639b4293383f7c3f2ae0f05)

roles/ceph-mgr/tasks/common.yml

index d9bc23f7ee6505602849998edd5be24123325a5d..193b72f27d781c3c5412f94728c7bb97074f7851 100644 (file)
@@ -59,7 +59,7 @@
       command: "{{ _container_exec_cmd | default('') }} ceph --cluster {{ cluster }} auth get {{ item.name }}"
       register: _mgr_keys
       with_items: "{{ _mgr_keys }}"
-      delegate_to: "{{ running_mon }}"
+      delegate_to: "{{ groups[mon_group_name][0] if running_mon is undefined else running_mon }}"
       when:
         - cephx | bool
         - item.copy_key | bool