From 64919e2439ad757b3d5282eab33e841447419a44 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 3 Sep 2019 15:23:15 -0400 Subject: [PATCH] profile eth0 -> interface eth0 when wan_try_dhcp_before_static_ip == False --- roles/network/templates/network/dhcpcd.conf.j2 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index eaeda072e..4b010dbba 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -59,16 +59,21 @@ static domain_name_servers=127.0.0.1 # IIAB static IP configuration, possibly trying DHCP first {% if wan_ip != "dhcp" %} +{% if wan_try_dhcp_before_static_ip %} profile static_eth0 static ip_address={{ wan_ip }}/24 static routers={{ wan_gateway }} static domain_name_servers={{ wan_nameserver }} -{% if wan_try_dhcp_before_static_ip %} # Check for DHCP on the wire first (for occasional field updates of IIAB, # e.g. using "cablemodem" Ethernet ports) before falling back to above Static # IP (e.g. 192.168.1.99 in Chiapas, Mexico) as used for everyday classrooms. interface {{ iiab_wan_iface }} fallback static_eth0 +{% else %} +interface {{ iiab_wan_iface }} +static ip_address={{ wan_ip }}/24 +static routers={{ wan_gateway }} +static domain_name_servers={{ wan_nameserver }} {% endif %} {% endif %}