feat: improve ceph flags

This commit is contained in:
Simon Cornet 2026-03-21 15:25:45 +01:00
commit 4f76ad3afe
2 changed files with 24 additions and 58 deletions

View file

@ -4,34 +4,17 @@
- name: "enable ceph maintenance mode"
block:
# set ceph osd noout settings
- name: "set ceph noout"
# set ceph maintenance flags
- name: "set ceph maintenance flags"
ansible.builtin.shell:
cmd: "ceph osd set noout"
cmd: "ceph osd set {{ item }}"
loop:
- "norecover"
- "norebalance"
- "nobackfill"
- "noscrub"
- "nodeep-scrub"
- "noout"
register: "ceph_flag_result"
changed_when: false
failed_when: "ceph_noout_result.rc != 0"
register: "ceph_noout_result"
# set ceph osd nobackfill settings
- name: "set ceph nobackfill"
ansible.builtin.shell:
cmd: "ceph osd set nobackfill"
changed_when: false
failed_when: "ceph_nobackfill_result.rc != 0"
register: "ceph_nobackfill_result"
# set ceph osd norebalance settings
- name: "set ceph norebalance"
ansible.builtin.shell:
cmd: "ceph osd set norebalance"
changed_when: false
failed_when: "ceph_norebalance_result.rc != 0"
register: "ceph_norebalance_result"
# set ceph osd norecover settings
- name: "set ceph norecover"
ansible.builtin.shell:
cmd: "ceph osd set norecover"
changed_when: false
failed_when: "ceph_norecover_result.rc != 0"
register: "ceph_norecover_result"
failed_when: "ceph_flag_result.rc != 0"