Update, upgrade and install packages

These examples show you how to install, update, and upgrade packages during boot.

For a full list of keys, refer to the package update upgrade install module schema.

Install arbitrary packages

#cloud-config
packages:
 - pwgen
 - pastebinit
 - [libpython2.7, 2.7.3-0ubuntu3.1]

Update and upgrade packages

 1#cloud-config
 2package_reboot_if_required: true
 3package_update: true
 4package_upgrade: true
 5packages:
 6- pwgen
 7- pastebinit
 8- [libpython3.8, 3.8.10-0ubuntu1~20.04.2]
 9- snap:
10  - certbot
11  - [juju, --edge]
12  - [lxd, --channel=5.15/stable]
13- apt: [mg]