]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-handler: Fix osd handler in check mode
authorBenoît Knecht <bknecht@protonmail.ch>
Mon, 26 Jul 2021 11:03:56 +0000 (13:03 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 2 Aug 2021 13:54:34 +0000 (15:54 +0200)
Run the Ceph commands that only gather information (without making any changes
to the cluster) when running Ansible in check mode.

This allows the tasks that depend on the variables set by those tasks to
succeed in check mode.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit 498acd7527410f7f359b2b0181e83ca39c682ec0)

roles/ceph-handler/tasks/handler_osds.yml

index f16a063600b92e6b1b58fbbef970435bda71fad6..e645cc722cb6aa23f5c86f7102862ccecce9e5a9 100644 (file)
@@ -15,6 +15,7 @@
       delegate_to: "{{ groups.get(mon_group_name, [])[0] }}"
       run_once: true
       changed_when: false
+      check_mode: false
 
     - name: get balancer module status
       command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
@@ -22,6 +23,7 @@
       run_once: true
       delegate_to: "{{ groups[mon_group_name][0] }}"
       changed_when: false
+      check_mode: false
 
     - name: set_fact pools_pgautoscaler_mode
       set_fact: