ceph-mon: Fix check mode for deploy monitor tasks

Skip the `get initial keyring when it already exists` task when both commands
whose `stdout` output it requires have been skipped (e.g. when running in check
mode).

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
debug_update_nfs_version
Benoît Knecht 2020-10-19 11:23:59 +02:00 committed by Guillaume Abrioux
parent 1f3289934a
commit 2437f14581
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@
- name: get initial keyring when it already exists - name: get initial keyring when it already exists
set_fact: set_fact:
monitor_keyring: "{{ (initial_mon_key.stdout | from_json)[0]['key'] if initial_mon_key is not skipped else monitor_keyring.stdout }}" monitor_keyring: "{{ (initial_mon_key.stdout | from_json)[0]['key'] if initial_mon_key is not skipped else monitor_keyring.stdout }}"
when: initial_mon_key.stdout|default('')|length > 0 or monitor_keyring is not skipped
- name: create monitor initial keyring - name: create monitor initial keyring
ceph_key: ceph_key: