]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
infrastructure-playbooks: Get Ceph info in check mode
authorBenoît Knecht <bknecht@protonmail.ch>
Mon, 26 Jul 2021 15:10:19 +0000 (17:10 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 2 Aug 2021 13:54:04 +0000 (15:54 +0200)
In the `set osd flags` block, run the Ceph commands that gather information
from the cluster (and don't make any changes to it) even when running 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 d7653dca95247e52c4a6821c1eec00748263082a)

infrastructure-playbooks/cephadm-adopt.yml
infrastructure-playbooks/rolling_update.yml
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index 7cc99c552a37559e39542f63b366db849a2bebdd..cdb7aae330ad79c97170d2177426a624c671cf42 100644 (file)
       run_once: true
       delegate_to: "{{ groups[mon_group_name][0] }}"
       changed_when: false
+      check_mode: false
 
     - name: get balancer module status
       command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
       run_once: true
       delegate_to: "{{ groups[mon_group_name][0] }}"
       changed_when: false
+      check_mode: false
 
     - name: set_fact pools_pgautoscaler_mode
       set_fact:
index 9965c763f0b70fff802f1568669b3a8daffe4a78..3b63c797d0bae93a90233519bc4c756382652567 100644 (file)
       register: pool_list
       run_once: true
       changed_when: false
+      check_mode: false
 
     - name: get balancer module status
       command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
       register: balancer_status
       changed_when: false
+      check_mode: false
 
     - name: set_fact pools_pgautoscaler_mode
       set_fact:
index 862e4ffa84f6260da44da36165c8d361a6e26f67..df9b13098448a3ab6da394bec8a9e47030e59572 100644 (file)
       command: "{{ ceph_cmd }} --cluster {{ cluster }} osd dump -f json"
       register: pool_list
       changed_when: false
+      check_mode: false
 
     - name: get balancer module status
       command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
       register: balancer_status
       changed_when: false
+      check_mode: false
 
     - name: set_fact pools_pgautoscaler_mode
       set_fact:
     # as in this case we know we want all owned by ceph user
     - name: set proper ownership on ceph directories
       command: "find /var/lib/ceph /etc/ceph -not -( -user {{ ceph_uid }} -or -group {{ ceph_uid }} -) -execdir chown {{ ceph_uid }}:{{ ceph_uid }} {} +"
-      changed_when: false
\ No newline at end of file
+      changed_when: false