feat: removed sudo and added playbook file

This commit is contained in:
Simon Cornet 2025-11-16 10:55:34 +01:00
commit 4e4f739c7c
6 changed files with 44 additions and 50 deletions

View file

@ -7,7 +7,7 @@
# unset ceph osd noout settings
- name: "unset ceph noout"
ansible.builtin.shell:
cmd: "sudo ceph osd unset noout"
cmd: "ceph osd unset noout"
changed_when: false
failed_when: "ceph_noout_result.rc != 0"
register: "ceph_noout_result"
@ -16,7 +16,7 @@
# unset ceph osd nobackfill settings
- name: "unset ceph nobackfill"
ansible.builtin.shell:
cmd: "sudo ceph osd unset nobackfill"
cmd: "ceph osd unset nobackfill"
changed_when: false
failed_when: "ceph_nobackfill_result.rc != 0"
register: "ceph_nobackfill_result"
@ -25,19 +25,8 @@
# unset ceph osd norebalance settings
- name: "unset ceph norebalance"
ansible.builtin.shell:
cmd: "sudo ceph osd unset norebalance"
cmd: "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"