Page MenuHomeDevCentral

D2334.diff
No OneTemporary

D2334.diff

diff --git a/pillar/core/network.sls b/pillar/core/network.sls
--- a/pillar/core/network.sls
+++ b/pillar/core/network.sls
@@ -3,6 +3,7 @@
netmask: 255.255.255.0
addr:
cloudhugger: 172.27.27.28
+ router-001: 172.27.27.1
windriver: 172.27.27.27
ysul: 172.27.27.33
diff --git a/pillar/nodes/nodes.sls b/pillar/nodes/nodes.sls
--- a/pillar/nodes/nodes.sls
+++ b/pillar/nodes/nodes.sls
@@ -80,6 +80,10 @@
ipv4_gateway: 91.121.86.254
ipv4_ovh_failover: True
+ private_interface: vmx1
+ private_address: 172.27.27.1
+ private_netmask: 255.255.255.0
+
ipv6_tunnel: False
ysul:
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,4 +9,12 @@
include:
- .ipv4
- .ipv6
+ - .private
- .gre
+
+# Drake can be configured as:
+#
+# - private (e.g. IntraNought network cards on EXSi hypervisor VMs)
+# - gre (e.g. isolated servers needing a tunnel)
+#
+# Both are needed for servers with router role.
diff --git a/roles/core/network/private.sls b/roles/core/network/private.sls
new file mode 100755
--- /dev/null
+++ b/roles/core/network/private.sls
@@ -0,0 +1,31 @@
+# -------------------------------------------------------------
+# Salt — Network
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2020-09-24
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set network = salt['node.get']('network') %}
+
+# -------------------------------------------------------------
+# Interface
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if salt['node.has']('network:private_interface') %}
+
+{% if grains['os'] == 'FreeBSD' %}
+/etc/rc.conf.d/netif/ipv4_{{ network['private_interface'] }}:
+ file.managed:
+ - source: salt://roles/core/network/files/FreeBSD/netif_ipv4.rc
+ - makedirs: True
+ - template: jinja
+ - context:
+ interface: {{ network['private_interface'] }}
+ ipv4_address: {{ network['private_address'] }}
+ ipv4_netmask: {{ network['private_netmask'] | default('255.255.255.0') }}
+ ipv4_aliases: {{ salt['node.get_list']('network:private_aliases') }}
+ dhcp_required: False
+{% endif %}
+
+{% endif %}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 08:15 (5 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2264356
Default Alt Text
D2334.diff (2 KB)

Event Timeline