summaryrefslogtreecommitdiff
path: root/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-02-25 01:28:18 +0100
committerChristian Pointner <equinox@spreadspace.org>2024-02-25 01:28:18 +0100
commit4e3053749991a09fbdf17ad93ee6654f4fbbf7a7 (patch)
treec1511e7a0a6db02510e51295b70e3c44063e1bc4 /roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
parentapt-repo/backports: fix for bookworm; ch-installsmb increase samba share for ... (diff)
installer/* improve regexp to set ssh port and fix ssh port config for newer ubuntu releases
Diffstat (limited to 'roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2')
-rw-r--r--roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j25
1 files changed, 3 insertions, 2 deletions
diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
index 125e8d82..2a5ad758 100644
--- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
+++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
@@ -248,13 +248,14 @@ autoinstall:
late-commands:
- curtin in-target --target=/target -- swapoff -a; sed -e '/^\/swapfile/d' -e '/^\/swap\.img/d' -i /etc/fstab; rm -f /swapfile /swap.img
{% if ansible_port is defined %}
- - curtin in-target --target=/target -- sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config
+ - curtin in-target --target=/target -- sed -e 's/^\s*#*\s*Port\s\s*[0-9][0-9]*$/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config
+ - curtin in-target --target=/target -- bash -c "mkdir -p /etc/systemd/system/ssh.socket.d; echo -e '[Socket]\nListenStream=\nListenStream={{ ansible_port }}' > /etc/systemd/system/ssh.socket.d/port.conf"
{% endif %}
- curtin in-target --target=/target -- apt-get -y -q purge multipath-tools open-vm-tools
- curtin in-target --target=/target -- apt-get -y -q purge systemd-oomd
{% if ubuntu_autoinstall_desktop is undefined %}
- 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 ubuntu-minimal unattended-upgrades sound-theme-freedesktop thin-provisioning-tools cryptsetup byobu open-iscsi btrfs-progs pollinate lxd-agent-loader ufw
+ - curtin in-target --target=/target -- apt-get -y -q purge policykit-1 ubuntu-minimal unattended-upgrades ubuntu-advantage-tools sound-theme-freedesktop thin-provisioning-tools cryptsetup byobu open-iscsi btrfs-progs pollinate lxd-agent-loader ufw
{% if install.disks.primary != "software-raid" %}
- curtin in-target --target=/target -- apt-get -y -q purge mdadm
{% endif %}