浏览代码

bridge

netifs
父节点
当前提交
7a188bfd95
共有 2 个文件被更改,包括 12 次插入2 次删除
  1. +1
    -1
      templates/netifs.json.j2
  2. +11
    -1
      templates/network-interface-debian.j2

+ 1
- 1
templates/netifs.json.j2 查看文件

@@ -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 查看文件

@@ -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}}


正在加载...
取消
保存