1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00
iiab/roles/network/templates/network/netplan.j2
Jerry Vonau 4c93054d45 using supplied 01-netcfg.yaml as example
note the use of yes in place of true for dhcp4
2018-12-29 13:16:59 -06:00

37 lines
1 KiB
Django/Jinja

network:
version: 2
{% if network_manager_active %}
renderer: NetworkManager
{% else %}
renderer: networkd
{% endif %}
ethernets:
{{ iiab_wan_iface }}:
{% if wan_ip != "dhcp" %}
addresses:
- {{ wan_ip }}/{{ wan_cidr }}
gateway4: {{ wan_gateway }}
nameservers:
addresses:
- {{ wan_nameserver }}
search:
- {{ iiab_domain }}
{% else %}
dhcp4: yes
{% endif %}
#{% if iiab_lan_iface == "br0" %}
# bridges:
# # the key name is the name for virtual (created) interfaces
# br0:
# # IDs of the components; switchports expands into multiple interfaces
# # interfaces: [switchports]
# # should really compute the netmask like the wan side
# addresses: [ {{ lan_ip }}/19]
# # there should really not be a gateway present testing to prove
# gateway4: {{ lan_ip }}
# nameservers:
# addresses: [{{ lan_ip }}]
# parameters:
# forward-delay: 0
# stp: false
#{% endif %}