I need to install some zfs packages on Debian instances using cloud-init. One of the packages needs the contrib sources. I can get it to update the sources list, but the packages fail to install. If I remove the contrib source lists, some packages install, just not the ones that need contrib. Kind of a catch 22. Has anyone had success installing zfs and all prerequisites using cloud-init?
Here is what I am using, when I add package_update
or preserve_sources_list: true
it fails to update the sources.list file. I can't win. lol Thanks!
#cloud-config
locale: en_US.UTF-8
timezone: America/New_York
apt:
sources_list: | # needed for spl package
deb $MIRROR $RELEASE bullseye main contrib
deb-src $MIRROR $RELEASE bullseye main contrib
deb $MIRROR $RELEASE bullseye-updates main contrib
deb-src $MIRROR $RELEASE bullseye-updates main contrib
deb $MIRROR $RELEASE bullseye-security main contrib
deb-src $MIRROR $RELEASE bullseye-security main contrib
packages:
- linux-headers-5.10.0-21-amd64
- linux-image-amd64
- spl
- kmod
- snapd
- nfs-common
- htop
- nano
- build-essential
- zfsutils-linux
- zfs-dkms
- zfs-zed
runcmd:
- mkdir /mnt/v-nas
- mkdir /mnt/home