Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3766405
D3384.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D3384.diff
View Options
diff --git a/roles/core/network/init.sls b/roles/core/network/init.sls
--- a/roles/core/network/init.sls
+++ b/roles/core/network/init.sls
@@ -9,6 +9,8 @@
include:
- .ipv4
- .ipv6
+ - .ipv6_tunnel
+ - .ipv6_fixes
- .dhclient6
- .gre
- .routes
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
@@ -2,21 +2,10 @@
# Salt — Network
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2016-06-15
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-# -------------------------------------------------------------
-# Table of contents
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-#
-# :: Native IPv6
-# :: 4to6 tunnel
-# :: Routes
-#
-# -------------------------------------------------------------
-
-{% from "map.jinja" import dirs, services with context %}
+{% from "map.jinja" import dirs with context %}
{% set network = salt['node.get']('network') %}
@@ -60,67 +49,3 @@
{% endif %}
{% endif %}
{% endfor %}
-
-# -------------------------------------------------------------
-# 4to6 tunnel
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-{% if salt['node.has']('network:ipv6_tunnel') %}
-network_ipv6:
- file.managed:
- - name : {{ dirs.sbin }}/ipv6-setup-tunnel
- - source: salt://roles/core/network/files/ipv6-tunnels/{{ grains['id'] }}.sh.jinja
- - template: jinja
- - mode: 755
-
-{% if services['manager'] == 'systemd' %}
-/etc/systemd/system/ipv6-tunnel.service:
- file.managed:
- - source: salt://roles/core/network/files/ipv6-tunnels/ipv6-tunnel.service
- - mode: 755
- service.running:
- - name: ipv6-tunnel
- - enable: true
-{% endif %}
-
-
-{% endif %}
-
-# -------------------------------------------------------------
-# Routes - legacy configuration for ipv6_gateway
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-{% if "ipv6_gateway" in network %}
-
-{% if grains['os'] == 'FreeBSD' %}
-/etc/rc.conf.d/routing/ipv6:
- file.managed:
- - source: salt://roles/core/network/files/FreeBSD/routing_ipv6.rc
- - makedirs: True
- - template: jinja
- - context:
- ipv6_gateway: {{ network["ipv6_gateway"] }}
-{% endif %}
-
-{% endif %}
-
-# -------------------------------------------------------------
-# Routes - IPv6 fix for OVH
-#
-# OVH network doesn't announce an IPv6 route for a VM at first.
-# If from the VM, we reach another network, the route is then
-# announced for a while, before being dropped.
-#
-# To workaround that behavior, solution is to ping regularly
-# an external site so packets reach OVH router and a route is
-# announced.
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-{% if salt['node.has']('fixes:hello_ipv6_ovh') %}
-
-/usr/local/etc/cron.d/hello-ipv6:
- file.managed:
- - source: salt://roles/core/network/files/FreeBSD/hello-ipv6.cron
- - makedirs: True
-
-{% endif %}
diff --git a/roles/core/network/ipv6_fixes.sls b/roles/core/network/ipv6_fixes.sls
new file mode 100644
--- /dev/null
+++ b/roles/core/network/ipv6_fixes.sls
@@ -0,0 +1,47 @@
+# -------------------------------------------------------------
+# Salt — Network
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set network = salt['node.get']('network') %}
+
+# -------------------------------------------------------------
+# Routes - legacy configuration for ipv6_gateway
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if "ipv6_gateway" in network %}
+
+{% if grains['os'] == 'FreeBSD' %}
+/etc/rc.conf.d/routing/ipv6:
+ file.managed:
+ - source: salt://roles/core/network/files/FreeBSD/routing_ipv6.rc
+ - makedirs: True
+ - template: jinja
+ - context:
+ ipv6_gateway: {{ network["ipv6_gateway"] }}
+{% endif %}
+
+{% endif %}
+
+# -------------------------------------------------------------
+# Routes - IPv6 fix for OVH
+#
+# OVH network doesn't announce an IPv6 route for a VM at first.
+# If from the VM, we reach another network, the route is then
+# announced for a while, before being dropped.
+#
+# To workaround that behavior, solution is to ping regularly
+# an external site so packets reach OVH router and a route is
+# announced.
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if salt['node.has']('fixes:hello_ipv6_ovh') %}
+
+/usr/local/etc/cron.d/hello-ipv6:
+ file.managed:
+ - source: salt://roles/core/network/files/FreeBSD/hello-ipv6.cron
+ - makedirs: True
+
+{% endif %}
diff --git a/roles/core/network/ipv6_tunnel.sls b/roles/core/network/ipv6_tunnel.sls
new file mode 100644
--- /dev/null
+++ b/roles/core/network/ipv6_tunnel.sls
@@ -0,0 +1,34 @@
+# -------------------------------------------------------------
+# Salt — Network
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import dirs, services with context %}
+
+# -------------------------------------------------------------
+# 4to6 tunnel
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if salt['node.has']('network:ipv6_tunnel') %}
+
+network_ipv6:
+ file.managed:
+ - name : {{ dirs.sbin }}/ipv6-setup-tunnel
+ - source: salt://roles/core/network/files/ipv6-tunnels/{{ grains['id'] }}.sh.jinja
+ - template: jinja
+ - mode: 755
+
+{% if services['manager'] == 'systemd' %}
+/etc/systemd/system/ipv6-tunnel.service:
+ file.managed:
+ - source: salt://roles/core/network/files/ipv6-tunnels/ipv6-tunnel.service
+ - mode: 755
+ service.running:
+ - name: ipv6-tunnel
+ - enable: true
+{% endif %}
+
+
+{% endif %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 18:08 (14 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258609
Default Alt Text
D3384.diff (6 KB)
Attached To
Mode
D3384: Split IPv6 network configuration
Attached
Detach File
Event Timeline
Log In to Comment