From 3be508bac52338a5fb95c8582b0b4470bd7a494f Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 13 Jul 2026 17:40:35 +0200 Subject: Configure ipv6/prefer ipv4 switches for network (and all hosts) --- roles/network/templates/eth0-connection.nmconnection.j2 | 8 ++++---- roles/network/templates/wifi-connection.nmconnection.j2 | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'roles/network/templates') 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] -- cgit v1.2.3