summaryrefslogtreecommitdiff
path: root/roles/installer
diff options
context:
space:
mode:
Diffstat (limited to 'roles/installer')
-rw-r--r--roles/installer/debian/preseed/tasks/main.yml3
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j26
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j211
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j26
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j26
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j26
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j211
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j26
-rw-r--r--roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j26
-rw-r--r--roles/installer/openbsd/autoinstall/templates/auto_install.conf.j26
10 files changed, 38 insertions, 29 deletions
diff --git a/roles/installer/debian/preseed/tasks/main.yml b/roles/installer/debian/preseed/tasks/main.yml
index aa71335e..46d6a1d9 100644
--- a/roles/installer/debian/preseed/tasks/main.yml
+++ b/roles/installer/debian/preseed/tasks/main.yml
@@ -29,6 +29,9 @@
copy:
dest: "{{ preseed_tmpdir }}/etc/systemd/network/90-namepolicy.link"
content: |
+ [Match]
+ OriginalName=*
+
[Link]
NamePolicy={{ preseed_force_net_ifnames_policy }}
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2
index 739d00ed..0f669006 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2
@@ -9,15 +9,15 @@ d-i keyboard-configuration/xkb-keymap select us
d-i hw-detect/load_firmware boolean false
-d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.interface) }}
+d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.name) }}
{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.ip }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.mask }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
index de69c10c..770eb146 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
@@ -9,15 +9,15 @@ d-i keyboard-configuration/xkb-keymap select us
d-i hw-detect/load_firmware boolean false
-d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.interface) }}
+d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.name) }}
{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.ip }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.mask }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
@@ -135,7 +135,10 @@ d-i preseed/late_command string \
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; \
- in-target bash -c "echo '[Link]' > /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '[Match]' > /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo 'OriginalName=*' >> /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '' >> /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '[Link]' >> /etc/systemd/network/90-namepolicy.link"; \
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 %}
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
index 35bb28b4..cf20410a 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
@@ -9,15 +9,15 @@ d-i keyboard-configuration/xkb-keymap select us
d-i hw-detect/load_firmware boolean false
-d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.interface) }}
+d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.name) }}
{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.ip }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.mask }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
index fb6ebfde..3528d682 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
@@ -9,15 +9,15 @@ d-i keyboard-configuration/xkb-keymap select us
d-i hw-detect/load_firmware boolean false
-d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.interface) }}
+d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.name) }}
{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.ip }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.mask }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
index 85a77f38..1b5245a1 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
@@ -16,15 +16,15 @@ d-i hw-detect/load_firmware boolean false
{% if preseed_no_netplan %}
d-i netcfg/do_not_use_netplan boolean true
{% endif %}
-d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.interface) }}
+d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.name) }}
{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.ip }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.mask }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
index 093bfdc5..ca018fd2 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
@@ -16,15 +16,15 @@ d-i hw-detect/load_firmware boolean false
{% if preseed_no_netplan %}
d-i netcfg/do_not_use_netplan boolean true
{% endif %}
-d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.interface) }}
+d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.name) }}
{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.ip }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.mask }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
@@ -152,7 +152,10 @@ d-i preseed/late_command string \
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; \
- in-target bash -c "echo '[Link]' > /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '[Match]' > /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo 'OriginalName=*' >> /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '' >> /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '[Link]' >> /etc/systemd/network/90-namepolicy.link"; \
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 %}
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
index bb510710..cdb5f966 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
@@ -13,15 +13,15 @@ d-i keyboard-configuration/layoutcode string us
d-i hw-detect/load_firmware boolean false
-d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.interface) }}
+d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.name) }}
{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.ip }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.mask }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
index bf4395a6..155801a4 100644
--- a/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
@@ -19,15 +19,15 @@ d-i hw-detect/load_firmware boolean false
{% if preseed_no_netplan %}
d-i netcfg/do_not_use_netplan boolean true
{% endif %}
-d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.interface) }}
+d-i netcfg/choose_interface select {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.name) }}
{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.ip }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.mask }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2 b/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2
index 4220be38..1e0c8c0c 100644
--- a/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2
+++ b/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2
@@ -1,11 +1,11 @@
System hostname = {{ hostvars[install_hostname].host_name }}
-Which network interface do you wish to configure = {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.interface) }}
+Which network interface do you wish to configure = {{ install_interface | default(hostvars[install_hostname].network_cooked.primary.name) }}
{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
IPv4 address = dhcp
{% else %}
-IPv4 address = {{ hostvars[install_hostname].network_cooked.primary.ip }}
-Netmask = {{ hostvars[install_hostname].network_cooked.primary.mask }}
+IPv4 address = {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+Netmask = {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
Default IPv4 route = {{ hostvars[install_hostname].network_cooked.primary.gateway }}
{% endif %}
DNS domain name = {{ hostvars[install_hostname].network_cooked.domain }}