chore 📦: Update apt cache and install all available updates for setupacdc.yml
Updated the setupacdc.yml task to include installing an updated apt cache, upgrading packages, and performing a non-interactive Ubuntu release upgrade. This change enhances the overall reliability of the setup process.
This commit is contained in:
@@ -151,13 +151,29 @@
|
||||
notify: Restart sshd
|
||||
tags: [timezone]
|
||||
|
||||
- name: Update apt cache
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
|
||||
- name: Install all available updates
|
||||
ansible.builtin.apt:
|
||||
upgrade: dist
|
||||
autoremove: true
|
||||
|
||||
- name: Reboot if a new kernel was installed
|
||||
ansible.builtin.reboot:
|
||||
msg: "Rebooting after full upgrade"
|
||||
connect_timeout: 5
|
||||
reboot_timeout: 600
|
||||
when: ansible_facts.packages is not defined or
|
||||
ansible_facts.packages['linux-image-generic'] is defined
|
||||
|
||||
- name: Ensure update-manager-core is installed
|
||||
ansible.builtin.apt:
|
||||
name: update-manager-core
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Run Ubuntu release upgrade (non-interactive)
|
||||
- name: Perform Ubuntu release upgrade non-interactively
|
||||
ansible.builtin.command:
|
||||
cmd: do-release-upgrade -f DistUpgradeViewNonInteractive
|
||||
register: upgrade_output
|
||||
|
||||
Reference in New Issue
Block a user