openstack-ansible-lxc_conta.../templates/suse-interface.j2
Markos Chandras 98b2ed0cb6 templates: suse-interface: Never ask for DHCP configuration
There is no DHCP server running for that interface so we get errors
when no static IP is defined since wicked fails to obtain a lease for
this interface. We should either define a static IP if available or
leave it unconfigured. This is also in line with the ifcfg(5) manpage
suggestion to use BOOTPROTO=static without any IP configuration if
we just want to bring an interface up but without any further
configuration.

Change-Id: I4c1189def8fe21386d02e9ba9ddebbd8c44b55c7
2017-07-17 14:28:28 +01:00

12 lines
365 B
Django/Jinja

# {{ ansible_managed }}
### start generated network for [ {{ item.value.interface }} ] ###
STARTMODE=auto
BOOTPROTO=static
{% if item.value.address is defined %}
IPADDR={{ item.value.address }}
NETMASK={{ item.value.netmask }}
{% endif %}
MTU={{ item.value.mtu|default(lxc_container_default_mtu) }}
### end generated network for [ {{ item.value.interface }} ] ###