From 371c25f0ef154ec72b386a869f0ea8aa0429898d Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 8 Feb 2022 18:02:24 +0100 Subject: [PATCH] adopt: fix bug in mon_ip_list set_fact `default('{}')` must be before `| from_json` Signed-off-by: Guillaume Abrioux (cherry picked from commit f30767432b2c3d5df60ff7087b77920ccd1ae0be) --- infrastructure-playbooks/cephadm-adopt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure-playbooks/cephadm-adopt.yml b/infrastructure-playbooks/cephadm-adopt.yml index 1db492149..8fa6da66f 100644 --- a/infrastructure-playbooks/cephadm-adopt.yml +++ b/infrastructure-playbooks/cephadm-adopt.yml @@ -468,7 +468,7 @@ - name: set_fact mon_ip_list set_fact: mon_ip_list: "{{ mon_ip_list | default([]) | union([item['addr'].split(':')[0]]) }}" - loop: "{{ (quorum_status.stdout | from_json | default('{}'))['monmap']['mons'] }}" + loop: "{{ (quorum_status.stdout | default('{}') | from_json)['monmap']['mons'] }}" run_once: true - name: remove current mirror peer