Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768464
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
23 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/core/network/files/netif_gre.rc b/roles/core/network/files/FreeBSD/netif_gre.rc
similarity index 91%
rename from roles/core/network/files/netif_gre.rc
rename to roles/core/network/files/FreeBSD/netif_gre.rc
index a9704af..5a06206 100644
--- a/roles/core/network/files/netif_gre.rc
+++ b/roles/core/network/files/FreeBSD/netif_gre.rc
@@ -1,17 +1,17 @@
# -------------------------------------------------------------
# Network — rc configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/core/network/files/netif_gre.rc
+# Source file: roles/core/network/files/FreeBSD/netif_gre.rc
# -------------------------------------------------------------
#
# <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>
cloned_interfaces="$cloned_interfaces {{ interface }}"
ifconfig_{{ interface }}="{{ src }} {{ dst }} netmask 0xffffffff tunnel {{ icann_src }} {{ icann_dst }} descr {{ description }}"
diff --git a/roles/core/network/files/netif.rc b/roles/core/network/files/FreeBSD/netif_ipv4.rc
similarity index 92%
rename from roles/core/network/files/netif.rc
rename to roles/core/network/files/FreeBSD/netif_ipv4.rc
index e604033..f76b3b7 100644
--- a/roles/core/network/files/netif.rc
+++ b/roles/core/network/files/FreeBSD/netif_ipv4.rc
@@ -1,23 +1,23 @@
# -------------------------------------------------------------
# Network — rc configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/core/network/files/netif.rc
+# Source file: roles/core/network/files/FreeBSD/netif_ipv4.rc
# -------------------------------------------------------------
#
# <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>
{% if dhcp_required %}
ifconfig_{{ interface }}="DHCP"
{% else %}
ifconfig_{{ interface }}="inet {{ ipv4_address }} netmask {{ ipv4_netmask }}"
{% endif %}
{% for ip in ipv4_aliases %}
ifconfig_{{ interface }}_alias{{ loop.index0 }}="inet {{ ip }} netmask 255.255.255.255"
{% endfor %}
diff --git a/roles/core/network/files/netif_ipv6.rc b/roles/core/network/files/FreeBSD/netif_ipv6.rc
similarity index 89%
copy from roles/core/network/files/netif_ipv6.rc
copy to roles/core/network/files/FreeBSD/netif_ipv6.rc
index 600f62c..50375a2 100644
--- a/roles/core/network/files/netif_ipv6.rc
+++ b/roles/core/network/files/FreeBSD/netif_ipv6.rc
@@ -1,16 +1,16 @@
# -------------------------------------------------------------
# Network — rc configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/core/network/files/netif_ipv6.rc
+# Source file: roles/core/network/files/FreeBSD/netif_ipv6.rc
# -------------------------------------------------------------
#
# <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>
ifconfig_{{ interface }}_ipv6="inet6 accept_rtadv"
diff --git a/roles/core/network/files/netif_ipv6.rc b/roles/core/network/files/FreeBSD/routing_ipv4.rc
similarity index 83%
rename from roles/core/network/files/netif_ipv6.rc
rename to roles/core/network/files/FreeBSD/routing_ipv4.rc
index 600f62c..d3d262c 100644
--- a/roles/core/network/files/netif_ipv6.rc
+++ b/roles/core/network/files/FreeBSD/routing_ipv4.rc
@@ -1,16 +1,16 @@
# -------------------------------------------------------------
# Network — rc configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/core/network/files/netif_ipv6.rc
+# Source file: roles/core/network/files/FreeBSD/routing_ipv4.rc
# -------------------------------------------------------------
#
# <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>
-ifconfig_{{ interface }}_ipv6="inet6 accept_rtadv"
+defaultrouter="{{ ipv4_gateway }}"
diff --git a/roles/core/network/files/routing.rc b/roles/core/network/files/FreeBSD/routing_ipv6.rc
old mode 100644
new mode 100755
similarity index 82%
rename from roles/core/network/files/routing.rc
rename to roles/core/network/files/FreeBSD/routing_ipv6.rc
index 4e17d7d..35f630d
--- a/roles/core/network/files/routing.rc
+++ b/roles/core/network/files/FreeBSD/routing_ipv6.rc
@@ -1,19 +1,16 @@
# -------------------------------------------------------------
# Network — rc configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/core/network/files/routing.rc
+# Source file: roles/core/network/files/FreeBSD/routing_ipv6.rc
# -------------------------------------------------------------
#
# <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>
-defaultrouter="{{ ipv4_gateway }}"
-{%- if ipv6_gateway %}
ipv6_defaultrouter="{{ ipv6_gateway }}"
-{% endif %}
diff --git a/roles/core/network/files/dwellers_ipv6.sh.jinja b/roles/core/network/files/ipv6-tunnels/dwellers.sh.jinja
similarity index 93%
rename from roles/core/network/files/dwellers_ipv6.sh.jinja
rename to roles/core/network/files/ipv6-tunnels/dwellers.sh.jinja
index 6346786..a1035db 100644
--- a/roles/core/network/files/dwellers_ipv6.sh.jinja
+++ b/roles/core/network/files/ipv6-tunnels/dwellers.sh.jinja
@@ -1,34 +1,34 @@
#!/bin/sh
# -------------------------------------------------------------
# IPv6 connectivity
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-10-20
# License: Trivial work, not eligible to copyright
-# Source file: roles/core/network/files/dwellers_ipv6.sh.jinja
+# Source file: roles/core/network/files/ipv6-tunnels/dwellers.sh.jinja
# -------------------------------------------------------------
#
# <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>
# -------------------------------------------------------------
# Hurricane Electric tunnel
# nasqueron-2.tunnel.tserv10.par1.ipv6.he.net
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ifconfig sit0 up
ifconfig sit0 inet6 tunnel ::216.66.84.42
ifconfig sit1 up
ifconfig sit1 inet6 add 2001:470:1f12:ce7::2/64
route -A inet6 add ::/0 dev sit1
# -------------------------------------------------------------
# Canonical IP
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ifconfig sit1 inet6 add 2001:470:1f13:ce7:ca5:cade:fab:1e/64
diff --git a/roles/core/network/files/eglide_ipv6.sh.jinja b/roles/core/network/files/ipv6-tunnels/eglide.sh.jinja
similarity index 95%
rename from roles/core/network/files/eglide_ipv6.sh.jinja
rename to roles/core/network/files/ipv6-tunnels/eglide.sh.jinja
index 2721752..92c5671 100644
--- a/roles/core/network/files/eglide_ipv6.sh.jinja
+++ b/roles/core/network/files/ipv6-tunnels/eglide.sh.jinja
@@ -1,47 +1,47 @@
#!/bin/sh
# -------------------------------------------------------------
# IPv6 connectivity
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Eglide
# Created: 2016-06-15
# License: Trivial work, not eligible to copyright
-# Source file: roles/core/network/files/eglide_ipv6.sh
+# Source file: roles/core/network/files/ipv6-tunnels/eglide.sh
# -------------------------------------------------------------
#
# <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>
IFCONFIG=/sbin/ifconfig
IP=/sbin/ip
ROUTE=/sbin/route
# -------------------------------------------------------------
# Hurricane Electric tunnel
# nasqueron-3.tunnel.tserv10.par1.ipv6.he.net
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$IFCONFIG sit0 up
$IFCONFIG sit0 inet6 tunnel ::216.66.84.42
$IFCONFIG sit1 up
$IFCONFIG sit1 inet6 add 2001:470:1f12:896::2/64
$ROUTE -A inet6 add ::/0 dev sit1
# -------------------------------------------------------------
# Canonical IP
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$IFCONFIG sit1 inet6 add 2001:470:1f13:896::c0de:15:11fe/64
# -------------------------------------------------------------
# Additional IP addresses
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Short block
{%- for n in range (1, 64) %}
$IP addr add 2001:470:1f13:896::{{ '%x' | format(n) }}/64 dev sit1 preferred_lft 0
{%- endfor %}
diff --git a/roles/core/network/files/equatower_ipv6.sh.jinja b/roles/core/network/files/ipv6-tunnels/equatower.sh.jinja
similarity index 93%
rename from roles/core/network/files/equatower_ipv6.sh.jinja
rename to roles/core/network/files/ipv6-tunnels/equatower.sh.jinja
index 9141d8e..bbc68af 100644
--- a/roles/core/network/files/equatower_ipv6.sh.jinja
+++ b/roles/core/network/files/ipv6-tunnels/equatower.sh.jinja
@@ -1,34 +1,34 @@
#!/bin/sh
# -------------------------------------------------------------
# IPv6 connectivity
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-10-20
# License: Trivial work, not eligible to copyright
-# Source file: roles/core/network/files/equatower_ipv6.sh.jinja
+# Source file: roles/core/network/files/ipv6-tunnels/equatower.sh.jinja
# -------------------------------------------------------------
#
# <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>
# -------------------------------------------------------------
# Hurricane Electric tunnel
# tunnel503394.tunnel.tserv10.par1.ipv6.he.net
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ifconfig sit0 up
ifconfig sit0 inet6 tunnel ::216.66.84.42
ifconfig sit1 up
ifconfig sit1 inet6 add 2001:470:1f12:365::2/64
route -A inet6 add ::/0 dev sit1
# -------------------------------------------------------------
# Canonical IP
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ifconfig sit1 inet6 add 2001:470:1f13:365::50f7:ba11/64
diff --git a/roles/core/network/files/ysul_ipv6.sh.jinja b/roles/core/network/files/ipv6-tunnels/ysul.sh.jinja
similarity index 96%
rename from roles/core/network/files/ysul_ipv6.sh.jinja
rename to roles/core/network/files/ipv6-tunnels/ysul.sh.jinja
index 0fcaee1..e66dd22 100644
--- a/roles/core/network/files/ysul_ipv6.sh.jinja
+++ b/roles/core/network/files/ipv6-tunnels/ysul.sh.jinja
@@ -1,54 +1,54 @@
#!/bin/sh
# -------------------------------------------------------------
# IPv6 connectivity
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-10-20
# License: Trivial work, not eligible to copyright
-# Source file: roles/core/network/files/ysul_ipv6.sh.jinja
+# Source file: roles/core/network/files/ipv6-tunnels/ysul.sh.jinja
# -------------------------------------------------------------
#
# <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>
IFCONFIG=/sbin/ifconfig
ROUTE=/sbin/route
# -------------------------------------------------------------
# Hurricane Electric tunnel
# nasqueron-1.tunnel.tserv10.par1.ipv6.he.net
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$IFCONFIG gif0 create
$IFCONFIG gif0 tunnel 212.83.187.132 216.66.84.42
$IFCONFIG gif0 inet6 2001:470:1f12:9e1::2 2001:470:1f12:9e1::1 prefixlen 128
$ROUTE -n add -inet6 default 2001:470:1f12:9e1::1
$IFCONFIG gif0 up
# -------------------------------------------------------------
# Canonical IP
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$IFCONFIG gif0 inet6 add 2001:470:1f13:9e1:0:c0ff:ee:1/64
# -------------------------------------------------------------
# Additional IP addresses
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Canonical block
{%- for n in range (2, 16) %}
$IFCONFIG gif0 inet6 add 2001:470:1f13:9e1:0:c0ff:ee:{{ '%x' | format(n) }}/64 alias
{%- endfor %}
# Short block
{%- for n in range (1, 26) %}
$IFCONFIG gif0 inet6 add 2001:470:1f13:9e1::{{ '%x' | format(n) }}/64 alias
{%- endfor %}
# Varnish cache
$IFCONFIG gif0 inet6 add 2001:470:1f13:9e1::cac:7e:1/64 alias
diff --git a/roles/core/network/gre.sls b/roles/core/network/gre.sls
new file mode 100644
index 0000000..fea8be0
--- /dev/null
+++ b/roles/core/network/gre.sls
@@ -0,0 +1,56 @@
+# -------------------------------------------------------------
+# Salt — Network — GRE tunnels
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2020-09-20
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set network = salt['node.get']('network') %}
+{% set gre_tunnels = salt['pillar.get']("gre_tunnels:" + grains['id'], {}) %}
+{% set boot_loader = namespace(gre=false) %}
+
+# -------------------------------------------------------------
+# Tunnels network configuration files
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% for description, tunnel in gre_tunnels.items() %}
+
+{% set boot_loader.gre = True %}
+{% set tunnel_network = pillar['networks'][tunnel['network']] %}
+
+{% if grains['os'] == 'FreeBSD' %}
+/etc/rc.conf.d/netif/gre_{{ description }}:
+ file.managed:
+ - source: salt://roles/core/network/files/FreeBSD/netif_gre.rc
+ - makedirs: True
+ - template: jinja
+ - context:
+ description: {{ description }}
+ interface: {{ tunnel['interface'] }}
+
+ src: {{ tunnel_network['addr'][grains['id']] }}
+ dst: {{ tunnel_network['addr'][tunnel['to']] }}
+
+ icann_src: {{ network['ipv4_address'] }}
+ icann_dst: {{ salt['node.get']('network', tunnel['to'])['ipv4_address'] }}
+{% endif %}
+
+{% endfor %}
+
+# -------------------------------------------------------------
+# Kernel configuration
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if boot_loader.gre %}
+
+{% if grains['os'] == 'FreeBSD' %}
+load_gre_kernel_module:
+ file.append:
+ - name: /boot/loader.conf
+ - text: |
+
+ if_gre_load="YES"
+{% endif %}
+
+{% endif %}
diff --git a/roles/core/network/init.sls b/roles/core/network/init.sls
index 5ba2822..ba4d3ab 100644
--- a/roles/core/network/init.sls
+++ b/roles/core/network/init.sls
@@ -1,109 +1,12 @@
# -------------------------------------------------------------
# Salt — Network
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2016-06-15
+# Created: 2020-09-20
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-{% from "map.jinja" import dirs with context %}
-
-{% set network = salt['node.get']('network') %}
-
-# -------------------------------------------------------------
-# IPv4
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-{% if grains['os'] == 'FreeBSD' %}
-/etc/rc.conf.d/netif/ipv4_{{ network['ipv4_interface'] }}:
- file.managed:
- - source: salt://roles/core/network/files/netif.rc
- - makedirs: True
- - template: jinja
- - context:
- interface: {{ network['ipv4_interface'] }}
- ipv4_address: {{ network['ipv4_address'] }}
- ipv4_netmask: {{ network['ipv4_netmask'] | default('255.255.255.0') }}
- ipv4_aliases: {{ salt['node.get_list']('network:ipv4_aliases') }}
- dhcp_required: {{ salt['node.has']('network:dhcp_required') }}
- ipv6_interface: {{ network['ipv6_interface'] }}
- has_native_ipv6: {{ salt['node.has']('network:ipv6_native') }}
-
-/etc/rc.conf.d/routing:
- file.managed:
- - source: salt://roles/core/network/files/routing.rc
- - template: jinja
- - context:
- ipv4_gateway: {{ network['ipv4_gateway'] }}
- ipv6_gateway: {{ network['ipv6_gateway'] | default('') }}
-{% endif %}
-
-# -------------------------------------------------------------
-# IPv6
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-{% if salt['node.has']('network:ipv6_native') %}
-{% if grains['os'] == 'FreeBSD' %}
-/etc/rc.conf.d/netif/ipv6_{{ network['ipv6_interface'] }}:
- file.managed:
- - source: salt://roles/core/network/files/netif_ipv6.rc
- - makedirs: True
- - template: jinja
- - context:
- interface: {{ network['ipv6_interface'] }}
- ipv6_address: {{ network['ipv6_address'] }}
- ipv6_prefix: {{ network['ipv6_prefix'] | default(64) }}
- has_native_ipv6: True
-{% endif %}
-{% endif %}
-
-{% if salt['node.has']('network:ipv6_tunnel') %}
-network_ipv6:
- file.managed:
- - name : {{ dirs.sbin }}/ipv6-setup-tunnel
- - source: salt://roles/core/network/files/{{ grains['id'] }}_ipv6.sh.jinja
- - template: jinja
- - mode: 755
-{% endif %}
-
-# -------------------------------------------------------------
-# GRE tunnels
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-{% set gre_tunnels = salt['pillar.get']("gre_tunnels:" + grains['id'], {}) %}
-
-{% if grains['os'] == 'FreeBSD' %}
-
-{% set boot_loader = namespace(gre=false) %}
-
-{% for description, tunnel in gre_tunnels.items() %}
-
-{% set boot_loader.gre = True %}
-{% set tunnel_network = pillar['networks'][tunnel['network']] %}
-
-/etc/rc.conf.d/netif/gre_{{ description }}:
- file.managed:
- - source: salt://roles/core/network/files/netif_gre.rc
- - makedirs: True
- - template: jinja
- - context:
- description: {{ description }}
- interface: {{ tunnel['interface'] }}
-
- src: {{ tunnel_network['addr'][grains['id']] }}
- dst: {{ tunnel_network['addr'][tunnel['to']] }}
-
- icann_src: {{ network['ipv4_address'] }}
- icann_dst: {{ salt['node.get']('network', tunnel['to'])['ipv4_address'] }}
-{% endfor %}
-
-{% if boot_loader.gre %}
-load_gre_kernel_module:
- file.append:
- - name: /boot/loader.conf
- - text: |
-
- if_gre_load="YES"
-{% endif %}
-
-{% endif %}
+include:
+ - .ipv4
+ - .ipv6
+ - .gre
diff --git a/roles/core/network/ipv4.sls b/roles/core/network/ipv4.sls
new file mode 100644
index 0000000..7907042
--- /dev/null
+++ b/roles/core/network/ipv4.sls
@@ -0,0 +1,41 @@
+# -------------------------------------------------------------
+# Salt — Network
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2016-06-15
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set network = salt['node.get']('network') %}
+
+# -------------------------------------------------------------
+# Interface
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if grains['os'] == 'FreeBSD' %}
+/etc/rc.conf.d/netif/ipv4_{{ network['ipv4_interface'] }}:
+ file.managed:
+ - source: salt://roles/core/network/files/FreeBSD/netif_ipv4.rc
+ - makedirs: True
+ - template: jinja
+ - context:
+ interface: {{ network['ipv4_interface'] }}
+ ipv4_address: {{ network['ipv4_address'] }}
+ ipv4_netmask: {{ network['ipv4_netmask'] | default('255.255.255.0') }}
+ ipv4_aliases: {{ salt['node.get_list']('network:ipv4_aliases') }}
+ dhcp_required: {{ salt['node.has']('network:dhcp_required') }}
+{% endif %}
+
+# -------------------------------------------------------------
+# Routes
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if grains['os'] == 'FreeBSD' %}
+/etc/rc.conf.d/routing/ipv4:
+ file.managed:
+ - source: salt://roles/core/network/files/FreeBSD/routing_ipv4.rc
+ - makedirs: True
+ - template: jinja
+ - context:
+ ipv4_gateway: {{ network['ipv4_gateway'] }}
+{% endif %}
diff --git a/roles/core/network/ipv6.sls b/roles/core/network/ipv6.sls
new file mode 100644
index 0000000..455a061
--- /dev/null
+++ b/roles/core/network/ipv6.sls
@@ -0,0 +1,69 @@
+# -------------------------------------------------------------
+# 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 with context %}
+
+{% set network = salt['node.get']('network') %}
+
+# -------------------------------------------------------------
+# Native IPv6
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if salt['node.has']('network:ipv6_native') %}
+
+{% if grains['os'] == 'FreeBSD' %}
+/etc/rc.conf.d/netif/ipv6_{{ network['ipv6_interface'] }}:
+ file.managed:
+ - source: salt://roles/core/network/files/FreeBSD/netif_ipv6.rc
+ - makedirs: True
+ - template: jinja
+ - context:
+ interface: {{ network['ipv6_interface'] }}
+ ipv6_address: {{ network['ipv6_address'] }}
+ ipv6_prefix: {{ network['ipv6_prefix'] | default(64) }}
+ has_native_ipv6: True
+{% endif %}
+
+{% endif %}
+
+# -------------------------------------------------------------
+# 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
+{% endif %}
+
+# -------------------------------------------------------------
+# Routes
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% 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'] | default('') }}
+{% endif %}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Nov 25, 08:07 (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259806
Default Alt Text
(23 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment