Loading playbook.yaml 0 → 100644 +33 −0 Original line number Diff line number Diff line --- # execute this role - name: "manage proxmox" hosts: "all" become: true serial: 1 tasks: # update cluster - name: "update cluster" tags: "update-cluster" block: # collect proxmox cluster nodes - name: "collect proxmox cluster nodes" set_fact: first_node: "{{ groups['proxmox'] | default([]) | first | default('') }}" last_node: "{{ groups['proxmox'] | default([]) | last | default('') }}" # enter ceph maintenance mode - name: "set ceph enter maintenance mode" ansible.builtin.import_tasks: "tasks/ceph/enter-maint.yaml" when: "inventory_hostname == first_node" # update proxmox cluster - name: "update proxmox cluster nodes" ansible.builtin.import_tasks: "tasks/proxmox/update-node.yaml" # exit ceph maintenance mode - name: "exit ceph maintenance mode" ansible.builtin.import_tasks: "tasks/ceph/exit-maint.yaml" when: "inventory_hostname == last_node" readme.md +2 −2 Original line number Diff line number Diff line Loading @@ -6,8 +6,8 @@ This role updates a Proxmox Cluster. | Operating System | Version | | --- | ----- | | Debian | 12 | | Proxmox VE | 9 | ## Tags This role has no tags. This role has one tag; `update-cluster`. tasks/ceph/enter-maint.yaml +3 −3 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ # set ceph osd noout settings - name: "set ceph noout" ansible.builtin.shell: cmd: "sudo ceph osd set noout" cmd: "ceph osd set noout" changed_when: false failed_when: "ceph_noout_result.rc != 0" register: "ceph_noout_result" Loading @@ -15,7 +15,7 @@ # set ceph osd nobackfill settings - name: "set ceph nobackfill" ansible.builtin.shell: cmd: "sudo ceph osd set nobackfill" cmd: "ceph osd set nobackfill" changed_when: false failed_when: "ceph_nobackfill_result.rc != 0" register: "ceph_nobackfill_result" Loading @@ -23,7 +23,7 @@ # set ceph osd norebalance settings - name: "set ceph norebalance" ansible.builtin.shell: cmd: "sudo ceph osd set norebalance" cmd: "ceph osd set norebalance" changed_when: false failed_when: "ceph_norebalance_result.rc != 0" register: "ceph_norebalance_result" tasks/ceph/exit-maint.yaml +3 −14 Original line number Diff line number Diff line Loading @@ -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" Loading @@ -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" Loading @@ -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" tasks/main.yamldeleted 100644 → 0 +0 −26 Original line number Diff line number Diff line --- # update cluster - name: "update cluster" tags: "update-cluster" block: # collect proxmox cluster nodes - name: "collect proxmox cluster nodes" set_fact: first_node: "{{ groups['proxmox'] | default([]) | first | default('') }}" last_node: "{{ groups['proxmox'] | default([]) | last | default('') }}" # enter ceph maintenance mode - name: "set ceph enter maintenance mode" ansible.builtin.include_tasks: "ceph/enter-maint.yaml" when: "inventory_hostname == first_node" # update proxmox cluster - name: "update proxmox cluster nodes" ansible.builtin.include_tasks: "proxmox/update-node.yaml" # exit ceph maintenance mode - name: "exit ceph maintenance mode" ansible.builtin.include_tasks: "ceph/exit-maint.yaml" when: "inventory_hostname == last_node" Loading
playbook.yaml 0 → 100644 +33 −0 Original line number Diff line number Diff line --- # execute this role - name: "manage proxmox" hosts: "all" become: true serial: 1 tasks: # update cluster - name: "update cluster" tags: "update-cluster" block: # collect proxmox cluster nodes - name: "collect proxmox cluster nodes" set_fact: first_node: "{{ groups['proxmox'] | default([]) | first | default('') }}" last_node: "{{ groups['proxmox'] | default([]) | last | default('') }}" # enter ceph maintenance mode - name: "set ceph enter maintenance mode" ansible.builtin.import_tasks: "tasks/ceph/enter-maint.yaml" when: "inventory_hostname == first_node" # update proxmox cluster - name: "update proxmox cluster nodes" ansible.builtin.import_tasks: "tasks/proxmox/update-node.yaml" # exit ceph maintenance mode - name: "exit ceph maintenance mode" ansible.builtin.import_tasks: "tasks/ceph/exit-maint.yaml" when: "inventory_hostname == last_node"
readme.md +2 −2 Original line number Diff line number Diff line Loading @@ -6,8 +6,8 @@ This role updates a Proxmox Cluster. | Operating System | Version | | --- | ----- | | Debian | 12 | | Proxmox VE | 9 | ## Tags This role has no tags. This role has one tag; `update-cluster`.
tasks/ceph/enter-maint.yaml +3 −3 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ # set ceph osd noout settings - name: "set ceph noout" ansible.builtin.shell: cmd: "sudo ceph osd set noout" cmd: "ceph osd set noout" changed_when: false failed_when: "ceph_noout_result.rc != 0" register: "ceph_noout_result" Loading @@ -15,7 +15,7 @@ # set ceph osd nobackfill settings - name: "set ceph nobackfill" ansible.builtin.shell: cmd: "sudo ceph osd set nobackfill" cmd: "ceph osd set nobackfill" changed_when: false failed_when: "ceph_nobackfill_result.rc != 0" register: "ceph_nobackfill_result" Loading @@ -23,7 +23,7 @@ # set ceph osd norebalance settings - name: "set ceph norebalance" ansible.builtin.shell: cmd: "sudo ceph osd set norebalance" cmd: "ceph osd set norebalance" changed_when: false failed_when: "ceph_norebalance_result.rc != 0" register: "ceph_norebalance_result"
tasks/ceph/exit-maint.yaml +3 −14 Original line number Diff line number Diff line Loading @@ -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" Loading @@ -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" Loading @@ -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"
tasks/main.yamldeleted 100644 → 0 +0 −26 Original line number Diff line number Diff line --- # update cluster - name: "update cluster" tags: "update-cluster" block: # collect proxmox cluster nodes - name: "collect proxmox cluster nodes" set_fact: first_node: "{{ groups['proxmox'] | default([]) | first | default('') }}" last_node: "{{ groups['proxmox'] | default([]) | last | default('') }}" # enter ceph maintenance mode - name: "set ceph enter maintenance mode" ansible.builtin.include_tasks: "ceph/enter-maint.yaml" when: "inventory_hostname == first_node" # update proxmox cluster - name: "update proxmox cluster nodes" ansible.builtin.include_tasks: "proxmox/update-node.yaml" # exit ceph maintenance mode - name: "exit ceph maintenance mode" ansible.builtin.include_tasks: "ceph/exit-maint.yaml" when: "inventory_hostname == last_node"