fix: merge apt update and upgrade
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
user: "{{ ntfy_user }}"
|
||||
password: "{{ lookup('env', 'NTFY_PASSWORD') }}"
|
||||
force_basic_auth: true
|
||||
body: Proxmox cluster not ready for updates
|
||||
body: Proxmox Not Ready for Updates
|
||||
headers:
|
||||
Title: "Proxmox cluster update failed"
|
||||
Priority: "5"
|
||||
@@ -94,16 +94,13 @@
|
||||
delay: 15
|
||||
|
||||
##########################################################
|
||||
# Upgrade packages
|
||||
# Update packages
|
||||
##########################################################
|
||||
|
||||
- name: Refresh repositories
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
|
||||
- name: Update packages
|
||||
ansible.builtin.apt:
|
||||
upgrade: dist
|
||||
update_cache: true
|
||||
upgrade: full
|
||||
autoremove: true
|
||||
autoclean: true
|
||||
|
||||
@@ -111,7 +108,7 @@
|
||||
# Capture new versions
|
||||
##########################################################
|
||||
|
||||
- name: Capture version after upgrade
|
||||
- name: Get version after upgrade
|
||||
ansible.builtin.shell: pveversion | awk -F'/' '{print $2}'
|
||||
register: pve_new_version
|
||||
delegate_to: "{{ groups['nodes'][0] }}"
|
||||
@@ -129,10 +126,6 @@
|
||||
reboot_timeout: 900
|
||||
post_reboot_delay: 30
|
||||
|
||||
- name: Wait for connection
|
||||
ansible.builtin.wait_for_connection:
|
||||
timeout: 600
|
||||
|
||||
- name: Enable Ceph rebalancing
|
||||
ansible.builtin.command: ceph osd unset noout
|
||||
|
||||
@@ -198,8 +191,11 @@
|
||||
body: |
|
||||
Proxmox cluster update completed successfully.
|
||||
{% if hostvars[groups['nodes'][0]].pve_current_version.stdout == hostvars[groups['nodes'][0]].pve_new_version.stdout %}
|
||||
Version unchanged ({{ hostvars[groups['nodes'][0]].pve_new_version.stdout }})
|
||||
{% else %}
|
||||
Old version: {{ pve_current_version.stdout }}
|
||||
New version: {{ pve_new_version.stdout }}
|
||||
{% endif %}
|
||||
headers:
|
||||
Title: "Proxmox Update Completed"
|
||||
Priority: "3"
|
||||
|
||||
Reference in New Issue
Block a user