ansible/preseed: Do not hardcode the installation interface
[noc.git] / ansible / roles / preseed / templates / preseed_debian-stretch.cfg.j2
index b9d0085..f39e3f3 100644 (file)
@@ -8,7 +8,7 @@ d-i debian-installer/locale string en_US.UTF-8
 d-i keyboard-configuration/xkb-keymap select us
 
 d-i netcfg/disable_dhcp boolean true
-d-i netcfg/choose_interface select enp1s1
+d-i netcfg/choose_interface select {{ install_interface | default(hostvars[hostname].network_cooked.primary.interface) }}
 d-i netcfg/disable_autoconfig boolean false
 d-i netcfg/get_ipaddress string {{ hostvars[hostname].network_cooked.primary.ip }}
 d-i netcfg/get_netmask string {{ hostvars[hostname].network_cooked.primary.mask }}