From 8b72074f8a0ec61de756c0809cbf59955f9ef8c3 Mon Sep 17 00:00:00 2001 From: Vezpi Date: Thu, 4 Jun 2026 21:28:01 +0000 Subject: [PATCH] chore: cleaning --- ansible/proxmox/update_proxmox.yml | 43 +----------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/ansible/proxmox/update_proxmox.yml b/ansible/proxmox/update_proxmox.yml index c89c987..79e22d9 100644 --- a/ansible/proxmox/update_proxmox.yml +++ b/ansible/proxmox/update_proxmox.yml @@ -5,10 +5,6 @@ become: true tasks: - ########################################################## - # Verify cluster health - ########################################################## - - delegate_to: "{{ groups['nodes'][0] }}" run_once: true block: @@ -25,11 +21,7 @@ changed_when: false failed_when: "'HEALTH_OK' not in ceph_health.stdout" - ########################################################## - # Capture current versions - ########################################################## - - - name: Capture version before upgrade + - name: Get version before upgrade ansible.builtin.shell: pveversion | awk -F'/' '{print $2}' register: pve_current_version changed_when: false @@ -63,18 +55,10 @@ - block: - ########################################################## - # Enable maintenance mode - ########################################################## - - name: Enable maintenance mode ansible.builtin.command: > ha-manager crm-command node-maintenance enable {{ inventory_hostname_short }} - ########################################################## - # Wait until node empty - ########################################################## - - name: Wait for LXCs to leave node ansible.builtin.shell: | pct list | awk 'NR>1 && $2=="running" {count++} END {print count+0}' @@ -93,10 +77,6 @@ retries: 60 delay: 15 - ########################################################## - # Update packages - ########################################################## - - name: Update packages ansible.builtin.apt: update_cache: true @@ -104,20 +84,12 @@ autoremove: true autoclean: true - ########################################################## - # Capture new versions - ########################################################## - - name: Get version after upgrade ansible.builtin.shell: pveversion | awk -F'/' '{print $2}' register: pve_new_version delegate_to: "{{ groups['nodes'][0] }}" changed_when: false - ########################################################## - # Reboot with Ceph rebalancing disabled - ########################################################## - - name: Disable Ceph rebalancing ansible.builtin.command: ceph osd set noout @@ -129,18 +101,10 @@ - name: Enable Ceph rebalancing ansible.builtin.command: ceph osd unset noout - ########################################################## - # Disable maintenance mode - ########################################################## - - name: Disable maintenance mode ansible.builtin.command: > ha-manager crm-command node-maintenance disable {{ inventory_hostname_short }} - ########################################################## - # Ceph validation - ########################################################## - - name: Wait for Ceph to be healthy ansible.builtin.command: ceph health register: ceph_status @@ -152,10 +116,6 @@ rescue: - ########################################################## - # Send notification - ########################################################## - - name: Send failure notification ansible.builtin.uri: url: "{{ ntfy_url }}/{{ ntfy_topic }}" @@ -200,6 +160,5 @@ Title: "Proxmox Update Completed" Priority: "3" Tags: "white_check_mark" - delegate_to: localhost when: ntfy_url is defined