summaryrefslogtreecommitdiff
path: root/roles/installer/ubuntu
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-09-05 18:42:45 +0200
committerChristian Pointner <equinox@spreadspace.org>2022-09-05 18:42:45 +0200
commitd8cad6edea49880eb93f8376c2425dfce4ed6716 (patch)
treec91f0bc785ed015b9d8f6d9d7cfc768be762f9a6 /roles/installer/ubuntu
parentraspios/image/firstrun: trigger restart of dhcpd after network config (diff)
ubuntu/installer: fix early command and focal support
Diffstat (limited to 'roles/installer/ubuntu')
-rw-r--r--roles/installer/ubuntu/autoinstall/files/early-command.py8
-rw-r--r--roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j25
2 files changed, 7 insertions, 6 deletions
diff --git a/roles/installer/ubuntu/autoinstall/files/early-command.py b/roles/installer/ubuntu/autoinstall/files/early-command.py
index 93d72b2d..0be450c9 100644
--- a/roles/installer/ubuntu/autoinstall/files/early-command.py
+++ b/roles/installer/ubuntu/autoinstall/files/early-command.py
@@ -15,11 +15,9 @@ try:
for c in config['storage']['config']:
if 'type' not in c or c['type'] != 'disk' or 'path' not in c:
continue
-
c['path'] = os.path.realpath(c['path'])
-
- with open('/autoinstall.yaml', 'w') as file:
- yaml.dump(config, file, default_flow_style=False)
-
except KeyError:
pass
+
+with open('/autoinstall.yaml', 'w') as file:
+ yaml.dump(config, file, default_flow_style=False)
diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
index 8bf62cd5..7add2640 100644
--- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
+++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
@@ -238,7 +238,10 @@ autoinstall:
- curtin in-target --target=/target -- sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config
{% endif %}
- curtin in-target --target=/target -- apt-mark manual iputils-ping isc-dhcp-client netcat-openbsd netplan.io sudo
- - curtin in-target --target=/target -- apt-get -y -q purge policykit-1 multipath-tools ubuntu-minimal unattended-upgrades sound-theme-freedesktop thin-provisioning-tools cryptsetup byobu open-iscsi btrfs-progs pollinate lxd-agent-loader open-vm-tools systemd-oomd
+ - curtin in-target --target=/target -- apt-get -y -q purge policykit-1 multipath-tools ubuntu-minimal unattended-upgrades sound-theme-freedesktop thin-provisioning-tools cryptsetup byobu open-iscsi btrfs-progs pollinate lxd-agent-loader open-vm-tools
+{% if ubuntu_installer_codename != 'focal' %}
+ - curtin in-target --target=/target -- apt-get -y -q purge systemd-oomd
+{% endif %}
{% if install.disks.primary != "software-raid" %}
- curtin in-target --target=/target -- apt-get -y -q purge mdadm
{% endif %}