From 8f436ab5d80c924d8841215307c17e38a70fb4bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Knecht?= Date: Mon, 19 Oct 2020 11:23:59 +0200 Subject: [PATCH] ceph-mon: Fix check mode for deploy monitor tasks MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- roles/ceph-mon/tasks/deploy_monitors.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/ceph-mon/tasks/deploy_monitors.yml b/roles/ceph-mon/tasks/deploy_monitors.yml index 42a076458..c5f64ee5d 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: -- 2.39.5