Page MenuHomeDevCentral

D3168.id8278.diff
No OneTemporary

D3168.id8278.diff

diff --git a/roles/core/network/files/ipv6-tunnels/ipv6-tunnel.service b/roles/core/network/files/ipv6-tunnels/ipv6-tunnel.service
new file mode 100644
--- /dev/null
+++ b/roles/core/network/files/ipv6-tunnels/ipv6-tunnel.service
@@ -0,0 +1,27 @@
+# -------------------------------------------------------------
+# Network — ipv6-tunnel configuration
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/core/network/files/Linux/ipv6-tunnel.service
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+[Unit]
+Description=Configure 4to6 tunnel through Hurricane Electric
+Documentation=https://agora.nasqueron.org/Operations_grimoire/Network
+After=network-online.target
+
+[Service]
+ExecStart=/usr/sbin/ipv6-setup-tunnel
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
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
@@ -16,7 +16,7 @@
#
# -------------------------------------------------------------
-{% from "map.jinja" import dirs with context %}
+{% from "map.jinja" import dirs, services with context %}
{% set network = salt['node.get']('network') %}
@@ -74,6 +74,18 @@
- 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

Mime Type
text/plain
Expires
Tue, Oct 1, 02:31 (20 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2167578
Default Alt Text
D3168.id8278.diff (2 KB)

Event Timeline