Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3769298
D2331.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D2331.id.diff
View Options
diff --git a/pillar/nodes/nodes.sls b/pillar/nodes/nodes.sls
--- a/pillar/nodes/nodes.sls
+++ b/pillar/nodes/nodes.sls
@@ -74,8 +74,11 @@
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
diff --git a/roles/core/network/files/FreeBSD/routing_ipv4.rc b/roles/core/network/files/FreeBSD/routing_ipv4.rc
--- a/roles/core/network/files/FreeBSD/routing_ipv4.rc
+++ b/roles/core/network/files/FreeBSD/routing_ipv4.rc
@@ -13,4 +13,10 @@
# 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
--- a/roles/core/network/ipv4.sls
+++ b/roles/core/network/ipv4.sls
@@ -38,4 +38,6 @@
- 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
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 14:05 (5 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260306
Default Alt Text
D2331.id.diff (1 KB)
Attached To
Mode
D2331: Configure OVH IP failover for FreeBSD
Attached
Detach File
Event Timeline
Log In to Comment