From 0b245bd0071038cde44fdc54993df65e2ed754e7 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 9 Oct 2019 14:46:43 +0200 Subject: [PATCH] dashboard: if no host is available, let's just skip these plays. If there is no host available, let's just skip these plays. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1759917 Signed-off-by: Guillaume Abrioux --- infrastructure-playbooks/dashboard.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infrastructure-playbooks/dashboard.yml b/infrastructure-playbooks/dashboard.yml index 023d1df05..f36e5ea1a 100644 --- a/infrastructure-playbooks/dashboard.yml +++ b/infrastructure-playbooks/dashboard.yml @@ -65,7 +65,9 @@ status: "Complete" end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}" -- hosts: "{{ groups[mgr_group_name] | default(groups[mon_group_name]) }}" +# using groups[] here otherwise it can't fallback to the mon if there's no mgr group. +# adding an additional | default(omit) in case where no monitors are present (external ceph cluster) +- hosts: "{{ groups[mgr_group_name] | default(groups[mon_group_name]) | default(omit) }}" become: true pre_tasks: - name: set ceph dashboard install 'In Progress'