feat: initial commit

This commit is contained in:
Simon Cornet 2025-05-30 15:04:18 +02:00
commit 5f0f242ab9
14 changed files with 322 additions and 0 deletions

View file

@ -0,0 +1,43 @@
---
# exit ceph maintenance mode
- name: "exit ceph maintenance mode"
block:
# unset ceph osd noout settings
- name: "unset ceph noout"
ansible.builtin.shell:
cmd: "sudo ceph osd unset noout"
changed_when: false
failed_when: "ceph_noout_result.rc != 0"
register: "ceph_noout_result"
tags: "cluster"
# unset ceph osd nobackfill settings
- name: "unset ceph nobackfill"
ansible.builtin.shell:
cmd: "sudo ceph osd unset nobackfill"
changed_when: false
failed_when: "ceph_nobackfill_result.rc != 0"
register: "ceph_nobackfill_result"
tags: "cluster"
# unset ceph osd norebalance settings
- name: "unset ceph norebalance"
ansible.builtin.shell:
cmd: "sudo ceph osd unset norebalance"
changed_when: false
failed_when: "ceph_norebalance_result.rc != 0"
register: "ceph_norebalance_result"
tags: "cluster"
# wait for ceph to be healthy
- name: "wait for ceph to be healthy"
ansible.builtin.shell:
cmd: "sudo ceph -s"
changed_when: false
delay: 10
register: "ceph_status"
retries: 30
tags: "cluster"
until: "'HEALTH_OK' in ceph_status.stdout"