1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00
iiab/roles/network/templates/network/iiab.j2
Arky 602223e4ff Adds spaces in variables after {{ and before }}
Fixes various warnings in Travis CI 

[EXTRA0001] Variables should have spaces after {{ and before }}
2017-10-20 11:36:10 +07:00

47 lines
1.7 KiB
Django/Jinja

# Generated by IIAB
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# iiab_network_mode is {{ gui_desired_network_role }}
{% if discovered_wireless_iface != 'none' %}
auto {{ discovered_wireless_iface }}
iface {{ discovered_wireless_iface }} inet manual
{% endif %}
{% if iiab_network_mode == "Appliance" %}
################# APPLIANCE #########################
auto {{ discovered_wan_iface }}
# if gui_static_wan == true dhcpcd.conf will be modified
iface {{ discovered_wan_iface }} inet manual
{% elif iiab_network_mode == "Gateway" %}
################# GATEWAY #########################
auto br0
iface br0 inet static
bridge_ports {% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }} {% endif %} {% if discovered_lan_iface != "none" %} {{ discovered_lan_iface }} {% endif %}
bridge_maxwait 0
address {{ lan_ip }}
netmask {{ lan_netmask }}
dns-nameservers {{ lan_ip }}
# change for debian 9, let dhcpcd.conf set the static ip
# if gui_static_wan == True
auto {{ discovered_wan_iface }}
iface {{ discovered_wan_iface }} inet manual
{% else %} {# end of iiab_network_mode == Gateway #}
################# LANCONTROLLER ###################
auto br0
iface br0 inet static
bridge_ports {% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }} {% endif %} {% if discovered_wan_iface != "none" %} {{ discovered_wan_iface }} {% endif %}
bridge_maxwait 0
address {{ lan_ip }}
netmask {{ lan_netmask }}
gateway {{ lan_ip }}
dns-nameservers {{ lan_ip }}
dns-search {{ iiab_domain }}
post-up systemctl restart dhcpd && systemctl restart hostapd
{% endif %}