fix: add update packages changed condition to reboot
This commit is contained in:
@@ -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: >
|
||||
|
||||
Reference in New Issue
Block a user