fix: add update packages changed condition to reboot
This commit is contained in:
@@ -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: Enable Ceph rebalancing
|
- name: Reboot node
|
||||||
ansible.builtin.command: ceph osd unset noout
|
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
|
- name: Disable maintenance mode
|
||||||
ansible.builtin.command: >
|
ansible.builtin.command: >
|
||||||
|
|||||||
Reference in New Issue
Block a user