diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-07-13 17:40:35 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-07-14 01:23:12 +0200 |
| commit | 3be508bac52338a5fb95c8582b0b4470bd7a494f (patch) | |
| tree | b2dccccbafb90bbd4a81ef772cc7ef6ae05793ce /roles/network/templates | |
| parent | 35a4c130750a5bc29655c1767701626ba898b70d (diff) | |
Configure ipv6/prefer ipv4 switches for network (and all hosts)
Diffstat (limited to 'roles/network/templates')
| -rw-r--r-- | roles/network/templates/eth0-connection.nmconnection.j2 | 8 | ||||
| -rw-r--r-- | roles/network/templates/wifi-connection.nmconnection.j2 | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/roles/network/templates/eth0-connection.nmconnection.j2 b/roles/network/templates/eth0-connection.nmconnection.j2 index d6d2ea86..032b18a3 100644 --- a/roles/network/templates/eth0-connection.nmconnection.j2 +++ b/roles/network/templates/eth0-connection.nmconnection.j2 @@ -28,13 +28,13 @@ method=auto [ipv6] addr-gen-mode=default -{% if network_bridge_interface is defined %} +{% if network_bridge_interface is defined or network_ipv6_disabled %} method=disabled -{% else %} +{% elif network_ipv6_gateway is defined %} method=auto -{% if network_ipv6_gateway is defined %} routes=::/0,{{ network_ipv6_gateway }},100 -{% endif %} +{% else %} +method=auto {% endif %} [proxy] diff --git a/roles/network/templates/wifi-connection.nmconnection.j2 b/roles/network/templates/wifi-connection.nmconnection.j2 index 5b4ab185..01dff2eb 100644 --- a/roles/network/templates/wifi-connection.nmconnection.j2 +++ b/roles/network/templates/wifi-connection.nmconnection.j2 @@ -27,9 +27,13 @@ method=auto [ipv6] addr-gen-mode=default +{% if network_ipv6_disabled %} +method=disabled +{% elif network_ipv6_gateway is defined %} method=auto -{% if network_ipv6_gateway is defined %} routes=::/0,{{ network_ipv6_gateway }},100 +{% else %} +method=auto {% endif %} [proxy] |
