Browse Source

bridge

netifs
parent
commit
7a188bfd95
2 changed files with 12 additions and 2 deletions
  1. +1
    -1
      templates/netifs.json.j2
  2. +11
    -1
      templates/network-interface-debian.j2

+ 1
- 1
templates/netifs.json.j2 View File

@@ -1,7 +1,7 @@
[
{% if netifs is defined %}
{% for netif in netifs %}
{% if netifs[netif].type == "ethernet" or ( netifs[netif].type == "virt" and virt_type=="qemu" ) %}
{% if netifs[netif].type == "ethernet" or ( netifs[netif].type == "virt" and virt_type=="qemu" ) or netifs[netif].type == "bridge" %}
"{{netif}}",
{% endif %}
{% endfor %}


+ 11
- 1
templates/network-interface-debian.j2 View File

@@ -53,12 +53,22 @@ iface {{ dev }} inet6 static

{% else %}

{% if netifs[netif].type == "bridge" %}
# bridge
iface {{ dev }} inet manual
{% if netifs[netif].devices is defined %}
bridge_ports {{ netifs[netif].devices | join(" ") }}
{% else %}
bridge_ports none
{% endif %}
{% endif %}

{% for ip in netifs[netif].ips %}
{% if ip.ip | ipv6 %}
# ipv6 {{ip.ip}}
iface {{ dev }} inet6 static
address {{ ip.ip | ipv6('address') }}
netmask {{ ip.ip | ipv6('netmask') }}
netmask {{ ip.ip | ipv6('prefix') }}
{% endif %}
{% if ip.ip | ipv4 %}
# ipv4 {{ip.ip}}


Loading…
Cancel
Save