]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-mon: Fix check mode for deploy monitor tasks
authorBenoît Knecht <bknecht@protonmail.ch>
Mon, 19 Oct 2020 09:23:59 +0000 (11:23 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 19 Oct 2020 18:22:08 +0000 (20:22 +0200)
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>
roles/ceph-mon/tasks/deploy_monitors.yml

index 42a07645803748de369342c6d8ab7a1c8826a518..c5f64ee5d26ca90338149a7a9b9c8c1da4fb2d44 100644 (file)
@@ -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: