I'm going through the Automated Server Installs for 20.04 webpage and do not see a way to specify arguments, such as --no-install-recommends or --no-install-suggests, within the package section of autoinstall.yaml. Is this possible? Without these arguments I'm adding a lot of unnecessary packages when adding a light desktop on top of Ubuntu Server. Thanks!
1 Answer
I found the answer to this question myself :) I found I can do what I need in the 'late-commands' section as shown. This will add a Lubuntu desktop to the Ubuntu server image.
#cloud-config
autoinstall:
identity: {hostname: ubuntu, password: $6$M8WLYPfCSDWz18Lz$HS5hdQVPithmdDEh.1mWsrKDc13bbSN8H08IzDdUhSAbM38.Xjm./fjAQk17LONkxhQ4L3YlZJY9wus2zDRK10,
realname: ubuntu, username: ubuntu}
late-commands:
- curtin in-target -- apt-get -y install xserver-xorg-core --no-install-recommends --no-install-suggests
- curtin in-target -- apt-get -y install openbox --no-install-recommends --no-install-suggests
- curtin in-target -- apt-get -y install xinit
- curtin in-target -- apt-get -y install lubuntu-desktop --no-install-recommends
network:
ethernets:
enp0s3: {dhcp4: true}
version: 2
updates: security
version: 1