]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
facts: fix nfs/external cluster scenario 4.2z1-async1-v4.0.49 v4.0.49.1
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 16 Mar 2021 13:13:13 +0000 (14:13 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 24 Mar 2021 16:36:58 +0000 (17:36 +0100)
These tasks shouldn't be run when at least 1 monitor isn't present in
the inventory.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1937997
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ccd1cbb732e25fe364b68a548cbed11da2a91ceb)
(cherry picked from commit bbf8b2fdf6842b5b1255a09fa60343c21e9a56ff)

roles/ceph-facts/tasks/facts.yml

index 66cea9c835763e056dff7354e8c3cd8111b85c09..822ca41d56591625ab0440274db9bf820bed4172 100644 (file)
 
 - name: backward compatibility tasks related
   when:
-    - inventory_hostname in groups.get(rgw_group_name, [])
-      or inventory_hostname in groups.get(nfs_group_name, [])
+    - (inventory_hostname in groups.get(rgw_group_name, []) or inventory_hostname in groups.get(nfs_group_name, []))
+    - groups.get(mon_group_name, []) | length > 0
   block:
     - name: get ceph current status
       command: "{{ timeout_command }} {{ _container_exec_cmd | default('') }} ceph --cluster {{ cluster }} service dump -f json"