Score:0

Apt sources missing in autoinstall environment (22.04.2)

fr flag

I am setting up a network autoinstall with the 22.04.2 image. With a packages key, the package installation step fails. (I thought it was working last week.) When I look into the target environment, all apt sources except cdrom are missing:

ubuntu-server@ca2-t-it02:~$ ls -la /target/etc/apt/sources.list.d/
total 8
drwxr-xr-x 2 root root 4096 Apr  8  2022 .
drwxr-xr-x 8 root root 4096 Apr  5 21:48 ..
ubuntu-server@ca2-t-it02:~$ cat /target/etc/apt/sources.list
deb [check-date=no] file:///cdrom jammy main restricted

If I remove the packages key and interrupt the install by forcing an error in late-commands, sources.list looks correct at that point. So it looks like I can get around this by doing the installs in late-commands, but it would be much nicer if it worked as advertised (https://ubuntu.com/server/docs/install/autoinstall-reference#packages).

Here's my autoinstall file:

#cloud-config
autoinstall:
  version: 1
  apt:
    geoip: false
    preserve_sources_list: false
    primary:
      - arches: ["default"]
        uri: http://us.archive.ubuntu.com/ubuntu/
  timezone: UTC
  identity:
    hostname: newhost.example.com
    realname: Local Administrator
    username: myadmin
    password: "<redacted>"
  keyboard: {layout: us, toggle: null, variant: ''}
  locale: en_US.UTF-8
  network:
    version: 2
    ethernets:
      srvnet:
        match:
          macaddress: '00:50:56:b3:bc:c9'
        set-name: mynet
        dhcp4: false
        dhcp6: false
        addresses: [ 10.1.1.213/24 ]
        gateway4: 10.1.1.1
        nameservers:
          search: [ example.com ]
          addresses: ["10.1.100.10", "10.2.100.10"]
  ssh:
    allow-pw: true
    authorized-keys: []
    install-server: true
  packages:
  - sssd-ad
  - sssd-tools
  - realmd
  updates: all
  storage:
    layout:
      name: lvm
David avatar
cn flag
What is the actual question?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.