Page MenuHomeDevCentral

No OneTemporary

diff --git a/pillar/nodes/nodes.sls b/pillar/nodes/nodes.sls
index bfcdece..d950f62 100644
--- a/pillar/nodes/nodes.sls
+++ b/pillar/nodes/nodes.sls
@@ -1,141 +1,144 @@
# -------------------------------------------------------------
# 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:
- paas-kubernetes
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
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
ipv6_tunnel: False
equatower:
forest: nasqueron-infra
hostname: equatower.nasqueron.org
roles:
- paas-docker
network:
ipv4_address: 51.255.124.10
ipv4_gateway: 91.121.86.254
ipv6_tunnel: True
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
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:
ipv6_tunnel: True
fixes:
rsyslog_xconsole: True
diff --git a/roles/core/network/files/FreeBSD/routing_ipv4.rc b/roles/core/network/files/FreeBSD/routing_ipv4.rc
index d3d262c..4297983 100644
--- a/roles/core/network/files/FreeBSD/routing_ipv4.rc
+++ b/roles/core/network/files/FreeBSD/routing_ipv4.rc
@@ -1,16 +1,22 @@
# -------------------------------------------------------------
# Network — rc configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# 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>
+{% if ipv4_ovh_failover %}
+static_routes="net1 net2"
+route_net1="-net {{ ipv4_gateway }}/32 -interface {{ ipv4_interface }}"
+route_net2="default {{ ipv4_gateway }}"
+{% else %}
defaultrouter="{{ ipv4_gateway }}"
+{% endif %}
diff --git a/roles/core/network/ipv4.sls b/roles/core/network/ipv4.sls
index 7907042..786797f 100644
--- a/roles/core/network/ipv4.sls
+++ b/roles/core/network/ipv4.sls
@@ -1,41 +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 %}
# -------------------------------------------------------------
# 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 %}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Jan 28, 08:02 (5 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2377656
Default Alt Text
(6 KB)

Event Timeline