summaryrefslogtreecommitdiffstats
path: root/roles/network/templates/bridge.nmconnection.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/network/templates/bridge.nmconnection.j2')
-rw-r--r--roles/network/templates/bridge.nmconnection.j229
1 files changed, 29 insertions, 0 deletions
diff --git a/roles/network/templates/bridge.nmconnection.j2 b/roles/network/templates/bridge.nmconnection.j2
new file mode 100644
index 00000000..2e8bf23c
--- /dev/null
+++ b/roles/network/templates/bridge.nmconnection.j2
@@ -0,0 +1,29 @@
+[connection]
+id={{ network_bridge }}
+type=bridge
+interface-name={{ network_bridge }}
+autoconnect=true
+
+[bridge]
+stp=false
+
+[ipv4]
+method=manual
+addresses={{ network_ipv4_address }}/{{ network_ipv4_prefix | default(24) }}
+gateway={{ network_ipv4_gateway }}
+{% if network_ipv4_dns is defined %}
+dns={{ network_ipv4_dns }}
+{% endif %}
+
+[ipv6]
+addr-gen-mode=default
+{% if network_ipv6_address is defined %}
+method=manual
+addresses={{ network_ipv6_address }}
+gateway={{ network_ipv6_gateway }}
+{% if network_ipv6_dns is defined %}
+dns={{ network_ipv6_dns }}
+{% endif %}
+{% else %}
+method=disabled
+{% endif %}