launch: use apt to update packages

This currently does an "unattended-upgrades -d" run.  I get why this
was done, as this looks at all dependencies and makes sure they are
suitable for install, and holds back anything that might have
conflicting config files.

The problem with the looking at the dependencies is it is *slow* --
like 20 minutes of processing.  I think that given we have just booted
a fresh upstream image and changed very little at this point, we are
OK to run a dist-upgrade at this point.  It will be much faster and
give us what we want, which is a up-to-date system.

Change-Id: I53442ca568cbb52b02ad3936c08b0536a73687fa
This commit is contained in:
Ian Wienand 2023-04-13 14:14:58 +10:00
parent 4a101da52a
commit e39e630619
No known key found for this signature in database
1 changed files with 5 additions and 5 deletions

View File

@ -1,8 +1,8 @@
- hosts: "{{ target }}"
user: root
tasks:
- name: Run unattended-upgrade on debuntu
shell: |
unattended-upgrade -d
when: ansible_facts['os_family'] == "Debian"
# TODO add equivalent for other platforms
- name: Upgrade packages
apt:
upgrade: dist
update_cache: yes
autoremove: yes