From: Benoît Knecht Date: Mon, 19 Oct 2020 09:23:59 +0000 (+0200) Subject: ceph-mon: Fix check mode for deploy monitor tasks X-Git-Tag: v5.0.3~49 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9f5ec22d3478584b987c2631a5c82fbd4fe4b43d;p=ceph-ansible.git 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 (cherry picked from commit 8f436ab5d80c924d8841215307c17e38a70fb4bd) --- diff --git a/roles/ceph-mon/tasks/deploy_monitors.yml b/roles/ceph-mon/tasks/deploy_monitors.yml index 4f9ee58f5..5e1e1b508 100644 --- a/roles/ceph-mon/tasks/deploy_monitors.yml +++ b/roles/ceph-mon/tasks/deploy_monitors.yml @@ -25,6 +25,7 @@ - name: get initial keyring when it already exists set_fact: monitor_keyring: "{{ initial_mon_key.stdout if monitor_keyring.skipped is defined else monitor_keyring.stdout if initial_mon_key.skipped is defined }}" + when: initial_mon_key is not skipped or monitor_keyring is not skipped - name: create monitor initial keyring ceph_key: