Page MenuHomeDevCentral

No OneTemporary

diff --git a/pillar/nodes/nodes.sls b/pillar/nodes/nodes.sls
index 8141854..c2bfdbf 100644
--- a/pillar/nodes/nodes.sls
+++ b/pillar/nodes/nodes.sls
@@ -1,153 +1,154 @@
# -------------------------------------------------------------
# Salt — Nodes
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-10-20
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
nodes:
##
## Forest: Nasqueron
## Semantic field: https://devcentral.nasqueron.org/P27
##
cloudhugger:
forest: nasqueron-infra
hostname: cloudhugger.nasqueron.org
roles:
- opensearch
network:
ipv4_interface: eno1
ipv4_address: 188.165.200.229
ipv4_gateway: 188.165.200.254
ipv6_interface: eno1
ipv6_address: fe80::ec4:7aff:fe6a:36e8
ipv6_gateway: fe80::ee30:91ff:fee0:df80
ipv6_prefix: 64
ipv6_native: True
ipv6_tunnel: False
dwellers:
forest: nasqueron-infra
hostname: dwellers.nasqueron.org
roles:
- paas-lxc
- paas-docker
- mastodon
flags:
install_docker_devel_tools: True
network:
ipv4_address: 51.255.124.11
ipv4_gateway: 91.121.86.254
private_interface:
uuid: 8e8ca793-b2eb-46d8-9266-125aba6d06c4
device: ens224
address: 172.27.27.4
netmask: 255.255.255.0
ipv6_tunnel: True
docker-001:
forest: nasqueron-infra
hostname: docker-001.nasqueron.org
roles:
- paas-docker
network:
ipv4_address: 51.255.124.9
ipv4_gateway: 91.121.86.254
private_interface:
uuid: 3fd0b9f8-ecc3-400d-bc61-3ba21d0b6337
device: ens224
address: 172.27.27.6
netmask: 255.255.255.0
ipv6_tunnel: False
router-001:
forest: nasqueron-infra
hostname: router-001.nasqueron.org
roles:
- router
network:
ipv4_interface: vmx0
ipv4_address: 51.255.124.8
ipv4_netmask: 255.255.255.255
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
+ private_interface:
+ device: vmx1
+ address: 172.27.27.1
+ netmask: 255.255.255.0
ipv6_tunnel: False
ysul:
forest: nasqueron-dev
hostname: ysul.nasqueron.org
roles:
- devserver
- saltmaster
- dbserver-mysql
- webserver-legacy
zfs:
pool: arcology
network:
ipv4_interface: igb0
ipv4_address: 163.172.49.16
ipv4_gateway: 163.172.49.1
ipv4_aliases:
- 212.83.187.132
ipv6_tunnel: True
ipv6_gateway: 2001:470:1f12:9e1::1
windriver:
forest: nasqueron-dev
hostname: windriver.nasqueron.org
roles:
- devserver
- saltmaster
- dbserver-mysql
- webserver-legacy
zfs:
pool: arcology
network:
ipv4_interface: igb0
ipv4_address: 51.159.18.59
ipv4_gateway: 51.159.18.1
ipv6_interface: igb0
ipv6_address: 2001:0bc8:6005:0005:aa1e:84ff:fef3:5d9c
ipv6_gateway: fe80::a293:51ff:feb7:5073
ipv6_prefix: 128
ipv6_native: True
ipv6_tunnel: False
##
## Forest: Eglide
## Semantic field: ? (P27 used for "Eglide" too)
##
## This forest is intended to separate credentials
## between Eglide and Nasqueron servers.
##
eglide:
forest: eglide
hostname: eglide.org
roles:
- shellserver
network:
ipv4_interface: ens2
ipv4_address: 51.159.150.221
ipv4_gateway: ""
ipv6_tunnel: True
fixes:
rsyslog_xconsole: True
diff --git a/roles/core/network/ipv4.sls b/roles/core/network/ipv4.sls
index cfa374a..786797f 100644
--- a/roles/core/network/ipv4.sls
+++ b/roles/core/network/ipv4.sls
@@ -1,55 +1,43 @@
# -------------------------------------------------------------
# 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 %}
-{% if grains['os_family'] == 'RedHat' %}
-{% if "private_interface" in network %}
-{% set interface = network['private_interface'] %}
-/etc/sysconfig/network-scripts/ifcfg-{{ interface['device'] }}:
- file.managed:
- - source: salt://roles/core/network/files/RedHat/ifcfg-private
- - template: jinja
- - context:
- interface: {{ interface }}
-{% endif %}
-{% 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'] }}
ipv4_interface: {{ network['ipv4_interface'] }}
ipv4_ovh_failover: {{ salt['node.has']('network:ipv4_ovh_failover') }}
{% endif %}
diff --git a/roles/core/network/private.sls b/roles/core/network/private.sls
index 486be62..3721993 100644
--- a/roles/core/network/private.sls
+++ b/roles/core/network/private.sls
@@ -1,31 +1,41 @@
# -------------------------------------------------------------
# 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') %}
+{% set interface = 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') }}
+ interface: {{ interface['device'] }}
+ ipv4_address: {{ interface['address'] }}
+ ipv4_netmask: {{ interface['netmask'] | default('255.255.255.0') }}
+ ipv4_aliases: {{ salt['node.get_list']('network:private_interface:aliases') }}
dhcp_required: False
{% endif %}
+{% if grains['os_family'] == 'RedHat' %}
+/etc/sysconfig/network-scripts/ifcfg-{{ interface['device'] }}:
+ file.managed:
+ - source: salt://roles/core/network/files/RedHat/ifcfg-private
+ - template: jinja
+ - context:
+ interface: {{ interface }}
+{% endif %}
+
{% endif %}

File Metadata

Mime Type
text/x-diff
Expires
Sat, Oct 11, 20:19 (10 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3063949
Default Alt Text
(7 KB)

Event Timeline