diff --git a/ansible/proxmox/update_proxmox.yml b/ansible/proxmox/update_proxmox.yml index e515388..c6b77f0 100644 --- a/ansible/proxmox/update_proxmox.yml +++ b/ansible/proxmox/update_proxmox.yml @@ -83,6 +83,7 @@ upgrade: full autoremove: true autoclean: true + register: update_packages - name: Get version after upgrade ansible.builtin.shell: pveversion | awk -F'/' '{print $2}' @@ -90,16 +91,19 @@ delegate_to: "{{ groups['nodes'][0] }}" changed_when: false - - name: Disable Ceph rebalancing - ansible.builtin.command: ceph osd set noout + - when: update_packages.changed + block: - - name: Reboot node - ansible.builtin.reboot: - reboot_timeout: 900 - post_reboot_delay: 30 - - - name: Enable Ceph rebalancing - ansible.builtin.command: ceph osd unset noout + - name: Disable Ceph rebalancing + ansible.builtin.command: ceph osd set noout + + - name: Reboot node + ansible.builtin.reboot: + reboot_timeout: 900 + post_reboot_delay: 30 + + - name: Enable Ceph rebalancing + ansible.builtin.command: ceph osd unset noout - name: Disable maintenance mode ansible.builtin.command: >