adopt: fix bug in mon_ip_list set_fact

`default('{}')` must be before `| from_json`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f30767432b)
pull/7085/head v6.0.24
Guillaume Abrioux 2022-02-08 18:02:24 +01:00
parent cb197575dd
commit 371c25f0ef
1 changed files with 1 additions and 1 deletions

View File

@ -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