From 802705ff9bf09c73d88e5ef0dc4c572cf090e363 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 16 Mar 2021 14:13:13 +0100 Subject: [PATCH] facts: fix nfs/external cluster scenario 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 (cherry picked from commit ccd1cbb732e25fe364b68a548cbed11da2a91ceb) --- roles/ceph-facts/tasks/facts.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/ceph-facts/tasks/facts.yml b/roles/ceph-facts/tasks/facts.yml index e67163463..c96386a49 100644 --- a/roles/ceph-facts/tasks/facts.yml +++ b/roles/ceph-facts/tasks/facts.yml @@ -262,8 +262,8 @@ - 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"