fix: add update packages changed condition to reboot

This commit is contained in:
2026-06-05 07:36:29 +00:00
parent b43300db27
commit 41955a69f7

View File

@@ -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: Disable Ceph rebalancing
ansible.builtin.command: ceph osd set noout
- name: Enable Ceph rebalancing
ansible.builtin.command: ceph osd unset 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: >