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