--- # ============================================================================= # proxmox_ceph.yml # CEPH management playbook for Proxmox clusters. # # Actions: # status — report current CEPH health and OSD state # set_noout — set noout flag before node maintenance # clear_noout — clear noout flag and wait for HEALTH_OK after maintenance # check_health — wait for CEPH to reach HEALTH_OK or HEALTH_WARN # # Usage: # # Check current status # ansible-playbook proxmox_ceph.yml -e "ceph_action=status" # # # Set noout before maintenance # ansible-playbook proxmox_ceph.yml -e "ceph_action=set_noout" # # # Clear noout after node comes back online # ansible-playbook proxmox_ceph.yml -e "ceph_action=clear_noout" # ============================================================================= - name: "Proxmox | CEPH Management" hosts: proxmox_cluster gather_facts: false vars: ceph_action: status pre_tasks: - name: "CEPH | Validate action" ansible.builtin.fail: msg: >- Invalid ceph_action '{{ ceph_action }}'. Must be one of: status, set_noout, clear_noout, check_health. when: ceph_action not in ['status', 'set_noout', 'clear_noout', 'check_health'] run_once: true - name: "CEPH | Log action" ansible.builtin.debug: msg: "CEPH action: {{ ceph_action }} on {{ client_name | default('cluster') }}" run_once: true roles: - role: proxmox_ceph