Set the MTU regardless if an address is present

Closes-Bug: #1753543
Change-Id: I1dd72bd0ddec6b944c9ab440e5e2809a6471ae03
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-03-06 10:14:27 -06:00 committed by Kevin Carter (cloudnull)
parent eabdc42c5e
commit 3d1e70d1be
1 changed files with 7 additions and 6 deletions

View File

@ -6,17 +6,18 @@ auto {{ item.value.interface }}
iface {{ item.value.interface }} inet static
address {{ item.value.address }}
netmask {{ item.value.netmask }}
{% if item.value.gateway is defined %}
{% if item.value.gateway is defined %}
gateway {{ item.value.gateway }}
{% endif %}
{% endif %}
mtu {{ item.value.mtu|default(lxc_container_default_mtu) }}
{% if item.value.static_routes is defined %}
{% for route in item.value.static_routes %}
{% if item.value.static_routes is defined %}
{% for route in item.value.static_routes %}
post-up ip route add {{ route['cidr'] }} via {{ route['gateway'] }} || true
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% else %}
iface {{ item.value.interface }} inet manual
mtu {{ item.value.mtu|default(lxc_container_default_mtu) }}
{% endif %}
{% for item in item.value.preup | default([]) | union(lxc_container_default_preup) %}
pre-up {{ item }}