summaryrefslogtreecommitdiff
path: root/roles/preseed/templates/preseed_debian-stretch.cfg.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-06-29 03:09:07 +0200
committerChristian Pointner <equinox@spreadspace.org>2019-06-29 03:09:21 +0200
commit0810f9241b1dbbf973e1ca7f69bc8b66a84a5750 (patch)
treeb6974316a1a09edaf2b5a902188d7881f6bf0037 /roles/preseed/templates/preseed_debian-stretch.cfg.j2
parentmake port 222 ssh default port for chaos at home (diff)
added gnocchi
Diffstat (limited to 'roles/preseed/templates/preseed_debian-stretch.cfg.j2')
-rw-r--r--roles/preseed/templates/preseed_debian-stretch.cfg.j27
1 files changed, 6 insertions, 1 deletions
diff --git a/roles/preseed/templates/preseed_debian-stretch.cfg.j2 b/roles/preseed/templates/preseed_debian-stretch.cfg.j2
index 0d44b35f..69b8ff33 100644
--- a/roles/preseed/templates/preseed_debian-stretch.cfg.j2
+++ b/roles/preseed/templates/preseed_debian-stretch.cfg.j2
@@ -9,14 +9,19 @@ d-i keyboard-configuration/xkb-keymap select us
d-i hw-detect/load_firmware boolean false
-d-i netcfg/disable_dhcp boolean true
d-i netcfg/choose_interface select {{ install_interface | default(hostvars[hostname].network_cooked.primary.interface) }}
+{% if install_dhcp is defined and 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[hostname].network_cooked.primary.ip }}
d-i netcfg/get_netmask string {{ hostvars[hostname].network_cooked.primary.mask }}
d-i netcfg/get_gateway string {{ hostvars[hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
+{% endif %}
d-i netcfg/hostname string {{ hostvars[hostname].host_name }}
d-i netcfg/get_hostname string {{ hostvars[hostname].host_name }}