adopt: fix bug in mon_ip_list set_fact

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/7084/head
Guillaume Abrioux 2022-02-08 18:02:24 +01:00
parent ddae06e1a2
commit f30767432b
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