]> 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 20:53:20 +0000 (22:53 +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>
(cherry picked from commit 8f436ab5d80c924d8841215307c17e38a70fb4bd)

roles/ceph-mon/tasks/deploy_monitors.yml

index 4f9ee58f5951844db8e9f9be2c9521dc1c0730d8..5e1e1b5081d7b4f300fdd9f6eb5c713514c3baa3 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: