summaryrefslogtreecommitdiffstats
path: root/roles/network
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2025-08-31 17:17:27 +0200
committerAhmed Abdelhalim <[email protected]>2025-08-31 17:19:14 +0200
commite700812dad60ee8b2b3345bf821640450f4f53cd (patch)
treefaee5a9b7e1c3777209c83d044eba510a827899a /roles/network
parent295f2cd4595ff032f9631bb6c6b5a60ecaf6dce8 (diff)
Allow network role to configure ipv6
Diffstat (limited to 'roles/network')
-rw-r--r--roles/network/meta/argument_specs.yml6
-rw-r--r--roles/network/templates/eth0-connection.nmconnection.j26
-rw-r--r--roles/network/templates/wifi-connection.nmconnection.j26
3 files changed, 18 insertions, 0 deletions
diff --git a/roles/network/meta/argument_specs.yml b/roles/network/meta/argument_specs.yml
index 58cc4efa..7cb3f62d 100644
--- a/roles/network/meta/argument_specs.yml
+++ b/roles/network/meta/argument_specs.yml
@@ -18,3 +18,9 @@ argument_specs:
network_ipv4_gateway:
type: "str"
description: "The network IP(4) gateway to configure when provided"
+ network_ipv6_address:
+ type: "str"
+ description: "The network IP(6) address to configure when provided"
+ network_ipv6_gateway:
+ type: "str"
+ description: "The network IP(6) gateway to configure when provided"
diff --git a/roles/network/templates/eth0-connection.nmconnection.j2 b/roles/network/templates/eth0-connection.nmconnection.j2
index ae573cf1..b981489a 100644
--- a/roles/network/templates/eth0-connection.nmconnection.j2
+++ b/roles/network/templates/eth0-connection.nmconnection.j2
@@ -16,6 +16,12 @@ method=auto
[ipv6]
addr-gen-mode=default
+{% if network_ipv6_address is defined %}
+method=manual
+addresses={{ network_ipv6_address }}
+gateway={{ network_ipv6_gateway }}
+{% else %}
method=auto
+{% endif %}
[proxy]
diff --git a/roles/network/templates/wifi-connection.nmconnection.j2 b/roles/network/templates/wifi-connection.nmconnection.j2
index deec573d..52cf2d19 100644
--- a/roles/network/templates/wifi-connection.nmconnection.j2
+++ b/roles/network/templates/wifi-connection.nmconnection.j2
@@ -24,6 +24,12 @@ method=auto
[ipv6]
addr-gen-mode=default
+{% if network_ipv6_address is defined %}
+method=manual
+addresses={{ network_ipv6_address }}
+gateway={{ network_ipv6_gateway }}
+{% else %}
method=auto
+{% endif %}
[proxy]