From 29650e71d8ac192ea6240df5f1641b87126322a3 Mon Sep 17 00:00:00 2001 From: Gaudenz Steinlin Date: Mon, 6 May 2019 10:14:36 +0200 Subject: [PATCH] Fix check mode support Adds "check_mode: no" to commands which register cluster state in a variable and don't modify anything. These commands have to run in order to support running the playbook in check mode. Signed-off-by: Gaudenz Steinlin (cherry picked from commit 3c8987c7a549b63b2e615c6daa4a3a93f5049967) --- roles/ceph-facts/tasks/facts.yml | 2 ++ roles/ceph-mgr/tasks/mgr_modules.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/roles/ceph-facts/tasks/facts.yml b/roles/ceph-facts/tasks/facts.yml index 74de769aa..8e63e924a 100644 --- a/roles/ceph-facts/tasks/facts.yml +++ b/roles/ceph-facts/tasks/facts.yml @@ -147,6 +147,7 @@ - name: resolve device link(s) command: readlink -f {{ item }} changed_when: false + check_mode: no with_items: "{{ devices }}" register: devices_prepare_canonicalize when: @@ -256,6 +257,7 @@ command: grep 'osd pool default crush rule' /etc/ceph/{{ cluster }}.conf register: crush_rule_variable changed_when: false + check_mode: no failed_when: false when: ceph_conf.stat.exists diff --git a/roles/ceph-mgr/tasks/mgr_modules.yml b/roles/ceph-mgr/tasks/mgr_modules.yml index 057e517c3..f044dcef4 100644 --- a/roles/ceph-mgr/tasks/mgr_modules.yml +++ b/roles/ceph-mgr/tasks/mgr_modules.yml @@ -11,6 +11,7 @@ - name: get enabled modules from ceph-mgr command: "{{ docker_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} --format json mgr module ls" + check_mode: no changed_when: false register: _ceph_mgr_modules delegate_to: "{{ groups[mon_group_name][0] }}" -- 2.39.5