mirror of https://github.com/ceph/ceph-ansible.git
infrastructure-playbooks: Get Ceph info in check mode
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 d7653dca95
)
pull/6783/head
parent
f9478472af
commit
35ce2bb643
|
@ -420,6 +420,7 @@
|
||||||
run_once: true
|
run_once: true
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
check_mode: false
|
||||||
|
|
||||||
- name: get balancer module status
|
- name: get balancer module status
|
||||||
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
|
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
|
||||||
|
@ -427,6 +428,7 @@
|
||||||
run_once: true
|
run_once: true
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
check_mode: false
|
||||||
|
|
||||||
- name: set_fact pools_pgautoscaler_mode
|
- name: set_fact pools_pgautoscaler_mode
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -405,11 +405,13 @@
|
||||||
register: pool_list
|
register: pool_list
|
||||||
run_once: true
|
run_once: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
check_mode: false
|
||||||
|
|
||||||
- name: get balancer module status
|
- name: get balancer module status
|
||||||
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
|
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
|
||||||
register: balancer_status
|
register: balancer_status
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
check_mode: false
|
||||||
|
|
||||||
- name: set_fact pools_pgautoscaler_mode
|
- name: set_fact pools_pgautoscaler_mode
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -219,11 +219,13 @@
|
||||||
command: "{{ ceph_cmd }} --cluster {{ cluster }} osd dump -f json"
|
command: "{{ ceph_cmd }} --cluster {{ cluster }} osd dump -f json"
|
||||||
register: pool_list
|
register: pool_list
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
check_mode: false
|
||||||
|
|
||||||
- name: get balancer module status
|
- name: get balancer module status
|
||||||
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
|
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
|
||||||
register: balancer_status
|
register: balancer_status
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
check_mode: false
|
||||||
|
|
||||||
- name: set_fact pools_pgautoscaler_mode
|
- name: set_fact pools_pgautoscaler_mode
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
Loading…
Reference in New Issue