From b9bf7c67033a61b04553915572210a4a1a9c1936 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 12 Dec 2018 09:53:32 +0100 Subject: [PATCH] purge-container: fix wrong syntax we want a default value for `mon_group_name`, not for `groups[mon_group_name]`. Signed-off-by: Guillaume Abrioux (cherry picked from commit d0b3cb7f851ece584da47af65c4416ad93541065) --- infrastructure-playbooks/purge-docker-cluster.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/infrastructure-playbooks/purge-docker-cluster.yml b/infrastructure-playbooks/purge-docker-cluster.yml index 1c479b007..218066f38 100644 --- a/infrastructure-playbooks/purge-docker-cluster.yml +++ b/infrastructure-playbooks/purge-docker-cluster.yml @@ -308,19 +308,18 @@ gather_facts: true become: true - pre_tasks: - - name: gather monitors facts - setup: - delegate_to: "{{ item }}" - delegate_facts: True - with_items: "{{ groups[mon_group_name] | default('mons') }}" - tasks: - import_role: name: ceph-defaults private: false + - name: gather monitors facts + setup: + delegate_to: "{{ item }}" + delegate_facts: True + with_items: "{{ groups.get(mon_group_name, 'mons') }}" + - name: get all the running osds shell: | systemctl list-units | grep 'loaded[[:space:]]\+active' | grep -oE "ceph-osd@([0-9]{1,2}|[a-z]+).service"