From 81789087e725fb9df89d75956ff9f4a9e582a716 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 5 Oct 2019 02:36:10 +0200 Subject: disable systemd-resolved --- roles/preseed/templates/preseed_debian-buster.cfg.j2 | 3 ++- roles/preseed/templates/preseed_debian-stretch.cfg.j2 | 3 ++- roles/preseed/templates/preseed_ubuntu-bionic.cfg.j2 | 3 ++- roles/preseed/templates/preseed_ubuntu-xenial.cfg.j2 | 3 ++- .../preseed/templates/preseed_xubuntu-cosmic-desktop-with-raid.cfg.j2 | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) (limited to 'roles/preseed/templates') diff --git a/roles/preseed/templates/preseed_debian-buster.cfg.j2 b/roles/preseed/templates/preseed_debian-buster.cfg.j2 index 7c1f044e..88cd4138 100644 --- a/roles/preseed/templates/preseed_debian-buster.cfg.j2 +++ b/roles/preseed/templates/preseed_debian-buster.cfg.j2 @@ -132,7 +132,7 @@ d-i finish-install/reboot_in_progress note d-i preseed/late_command string \ lvremove -f {{ hostvars[hostname].host_name }}/dummy; \ in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \ - in-target bash -c "passwd -d root && passwd -l root"; \ + in-target bash -c "systemctl mask systemd-resolved.service"; \ in-target bash -c "sed -e 's/^allow-hotplug/auto/' -i /etc/network/interfaces"; \ {% if preseed_force_net_ifnames_policy is defined %} mkdir -p /target/etc/systemd/network; \ @@ -140,6 +140,7 @@ d-i preseed/late_command string \ in-target bash -c "echo 'NamePolicy={{ preseed_force_net_ifnames_policy }}' >> /etc/systemd/network/90-namepolicy.link"; \ in-target bash -c "update-initramfs -u"; \ {% endif %} + in-target bash -c "passwd -d root && passwd -l root"; \ {% if hostvars[hostname].ansible_port is defined %} in-target bash -c "sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[hostname].ansible_port }}/' -i /etc/ssh/sshd_config"; \ {% endif %} diff --git a/roles/preseed/templates/preseed_debian-stretch.cfg.j2 b/roles/preseed/templates/preseed_debian-stretch.cfg.j2 index 7de73ded..4a99f766 100644 --- a/roles/preseed/templates/preseed_debian-stretch.cfg.j2 +++ b/roles/preseed/templates/preseed_debian-stretch.cfg.j2 @@ -132,7 +132,7 @@ d-i finish-install/reboot_in_progress note d-i preseed/late_command string \ lvremove -f {{ hostvars[hostname].host_name }}/dummy; \ in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \ - in-target bash -c "passwd -d root && passwd -l root"; \ + in-target bash -c "systemctl mask systemd-resolved.service"; \ in-target bash -c "sed -e 's/^allow-hotplug/auto/' -i /etc/network/interfaces"; \ {% if preseed_force_net_ifnames_policy is defined %} mkdir -p /target/etc/systemd/network; \ @@ -140,6 +140,7 @@ d-i preseed/late_command string \ in-target bash -c "echo 'NamePolicy={{ preseed_force_net_ifnames_policy }}' >> /etc/systemd/network/90-namepolicy.link"; \ in-target bash -c "update-initramfs -u"; \ {% endif %} + in-target bash -c "passwd -d root && passwd -l root"; \ {% if hostvars[hostname].ansible_port is defined %} in-target bash -c "sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[hostname].ansible_port }}/' -i /etc/ssh/sshd_config"; \ {% endif %} diff --git a/roles/preseed/templates/preseed_ubuntu-bionic.cfg.j2 b/roles/preseed/templates/preseed_ubuntu-bionic.cfg.j2 index 453fb150..5b6ea505 100644 --- a/roles/preseed/templates/preseed_ubuntu-bionic.cfg.j2 +++ b/roles/preseed/templates/preseed_ubuntu-bionic.cfg.j2 @@ -140,8 +140,8 @@ d-i preseed/late_command string \ lvremove -f {{ hostvars[hostname].host_name }}/dummy; \ in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -i /etc/fstab; rm -f /swapfile"; \ in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \ + in-target bash -c "systemctl mask systemd-resolved.service"; \ in-target bash -c "apt-get purge -y -q netplan.io && apt-get autoremove -y -q && rm -rf /etc/netplan"; \ - in-target bash -c "passwd -d root && passwd -l root"; \ in-target bash -c "sed -e 's/^allow-hotplug/auto/' -i /etc/network/interfaces"; \ {% if preseed_force_net_ifnames_policy is defined %} mkdir -p /target/etc/systemd/network; \ @@ -149,6 +149,7 @@ d-i preseed/late_command string \ in-target bash -c "echo 'NamePolicy={{ preseed_force_net_ifnames_policy }}' >> /etc/systemd/network/90-namepolicy.link"; \ in-target bash -c "update-initramfs -u"; \ {% endif %} + in-target bash -c "passwd -d root && passwd -l root"; \ {% if hostvars[hostname].ansible_port is defined %} in-target bash -c "sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[hostname].ansible_port }}/' -i /etc/ssh/sshd_config"; \ {% endif %} diff --git a/roles/preseed/templates/preseed_ubuntu-xenial.cfg.j2 b/roles/preseed/templates/preseed_ubuntu-xenial.cfg.j2 index 2096c757..7c78b746 100644 --- a/roles/preseed/templates/preseed_ubuntu-xenial.cfg.j2 +++ b/roles/preseed/templates/preseed_ubuntu-xenial.cfg.j2 @@ -138,7 +138,7 @@ d-i finish-install/reboot_in_progress note d-i preseed/late_command string \ lvremove -f {{ hostvars[hostname].host_name }}/dummy; \ in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \ - in-target bash -c "passwd -d root && passwd -l root"; \ + in-target bash -c "systemctl mask systemd-resolved.service"; \ in-target bash -c "sed -e 's/^allow-hotplug/auto/' -i /etc/network/interfaces"; \ {% if preseed_force_net_ifnames_policy is defined %} mkdir -p /target/etc/systemd/network; \ @@ -146,6 +146,7 @@ d-i preseed/late_command string \ in-target bash -c "echo 'NamePolicy={{ preseed_force_net_ifnames_policy }}' >> /etc/systemd/network/90-namepolicy.link"; \ in-target bash -c "update-initramfs -u"; \ {% endif %} + in-target bash -c "passwd -d root && passwd -l root"; \ {% if hostvars[hostname].ansible_port is defined %} in-target bash -c "sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[hostname].ansible_port }}/' -i /etc/ssh/sshd_config"; \ {% endif %} diff --git a/roles/preseed/templates/preseed_xubuntu-cosmic-desktop-with-raid.cfg.j2 b/roles/preseed/templates/preseed_xubuntu-cosmic-desktop-with-raid.cfg.j2 index 4e310a46..b687b230 100644 --- a/roles/preseed/templates/preseed_xubuntu-cosmic-desktop-with-raid.cfg.j2 +++ b/roles/preseed/templates/preseed_xubuntu-cosmic-desktop-with-raid.cfg.j2 @@ -146,8 +146,8 @@ d-i preseed/late_command string \ lvremove -f {{ hostvars[hostname].host_name }}/dummy; \ in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -i /etc/fstab; rm -f /swapfile"; \ in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \ + in-target bash -c "systemctl mask systemd-resolved.service"; \ in-target bash -c "apt-get purge -y -q netplan.io && apt-get autoremove -y -q && rm -rf /etc/netplan"; \ - in-target bash -c "passwd -d root && passwd -l root"; \ in-target bash -c "sed -e 's/^allow-hotplug/auto/' -i /etc/network/interfaces"; \ {% if preseed_force_net_ifnames_policy is defined %} mkdir -p /target/etc/systemd/network; \ @@ -155,6 +155,7 @@ d-i preseed/late_command string \ in-target bash -c "echo 'NamePolicy={{ preseed_force_net_ifnames_policy }}' >> /etc/systemd/network/90-namepolicy.link"; \ in-target bash -c "update-initramfs -u"; \ {% endif %} + in-target bash -c "passwd -d root && passwd -l root"; \ {% if hostvars[hostname].ansible_port is defined %} in-target bash -c "sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ hostvars[hostname].ansible_port }}/' -i /etc/ssh/sshd_config"; \ {% endif %} -- cgit v1.2.3