Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3750520
D3078.id7857.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D3078.id7857.diff
View Options
diff --git a/pillar/nodes/nodes.sls b/pillar/nodes/nodes.sls
--- a/pillar/nodes/nodes.sls
+++ b/pillar/nodes/nodes.sls
@@ -194,6 +194,7 @@
- saas-wordpress
network:
ipv6_tunnel: False
+ ipv6_native: True
canonical_public_ipv4: 51.255.124.10
@@ -211,6 +212,10 @@
address: 51.255.124.10
netmask: 255.255.255.255
gateway: 51.210.99.254
+ ipv6:
+ address: 2001:41d0:303:d971::517e:c0de
+ gateway: 2001:41d0:303:d9ff:ff:ff:ff:ff
+ prefix: 64
ysul:
forest: nasqueron-dev
diff --git a/roles/core/network/files/FreeBSD/routing_ipv6.rc b/roles/core/network/files/FreeBSD/routing_ipv6.rc
--- a/roles/core/network/files/FreeBSD/routing_ipv6.rc
+++ b/roles/core/network/files/FreeBSD/routing_ipv6.rc
@@ -13,4 +13,10 @@
# and will be lost if the state is redeployed.
# </auto-generated>
+{% if interface is defined and salt["network_utils.can_directly_be_discovered"](ipv6_gateway, ipv6_address, ipv6_prefix) %}
+ipv6_static_routes="gw default"
+ipv6_route_gw="{{ ipv6_gateway }} -iface {{ interface }}"
+ipv6_route_default="default {{ ipv6_gateway }}"
+{% else %}
ipv6_defaultrouter="{{ ipv6_gateway }}"
+{% endif %}
diff --git a/roles/core/network/ipv6.sls b/roles/core/network/ipv6.sls
--- a/roles/core/network/ipv6.sls
+++ b/roles/core/network/ipv6.sls
@@ -28,10 +28,6 @@
{% for interface_name, interface in network["interfaces"].items() %}
{% if "ipv6" in interface %}
- {% if "gateway" in interface["ipv6"] %}
- {% set ipv6_gateway = interface["ipv6"]["gateway"] %}
- {% endif %}
-
{% if grains['os'] == 'FreeBSD' %}
/etc/rc.conf.d/netif/ipv6_{{ interface['device'] }}:
file.managed:
@@ -43,8 +39,21 @@
ipv6_address: {{ interface['ipv6']['address'] }}
ipv6_prefix: {{ interface['ipv6']['prefix'] | default(64) }}
has_native_ipv6: True
+
+ {% if "gateway" in interface["ipv6"] %}
+ /etc/rc.conf.d/routing/ipv6:
+ file.managed:
+ - source: salt://roles/core/network/files/FreeBSD/routing_ipv6.rc
+ - makedirs: True
+ - template: jinja
+ - context:
+ interface: {{ interface['device'] }}
+ ipv6_address: {{ interface['ipv6']['address'] }}
+ ipv6_prefix: {{ interface['ipv6']['prefix'] | default(64) }}
+ ipv6_gateway: {{ interface['ipv6']['gateway'] }}
{% endif %}
+ {% endif %}
{% endif %}
{% endfor %}
{% endif %}
@@ -63,7 +72,7 @@
{% endif %}
# -------------------------------------------------------------
-# Routes
+# Routes - legacy configuration for ipv6_gateway
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% if "ipv6_gateway" in network %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 01:26 (1 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2250038
Default Alt Text
D3078.id7857.diff (2 KB)
Attached To
Mode
D3078: Setup native IPv6 connectivity on web-001
Attached
Detach File
Event Timeline
Log In to Comment