Page MenuHomeDevCentral

D4068.id10698.diff
No OneTemporary

D4068.id10698.diff

diff --git a/roles/router/frrouting/config.sls b/roles/router/frrouting/config.sls
--- a/roles/router/frrouting/config.sls
+++ b/roles/router/frrouting/config.sls
@@ -4,3 +4,20 @@
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
+
+{% if grains['id'] == 'router-002' %}
+{% set ospf_router_id = '2.2.2.2' %}
+{% elif grains['id'] == 'router-003' %}
+{% set ospf_router_id = '3.3.3.3' %}
+{% endif %}
+
+/usr/local/etc/frr/frr.conf:
+ file.managed:
+ - source: salt://roles/router/frrouting/files/frr.conf
+ - template: jinja
+ - user: frr
+ - group: frr
+ - mode: 644
+ - context:
+ hostname: {{ grains[ 'id' ] }}
+ router_id: {{ ospf_router_id }}
diff --git a/roles/router/frrouting/files/frr.conf b/roles/router/frrouting/files/frr.conf
new file mode 100644
--- /dev/null
+++ b/roles/router/frrouting/files/frr.conf
@@ -0,0 +1,41 @@
+# -------------------------------------------------------------
+# Network — Configuration VRRouting with OSPF
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/router/frrouting/files/frr.conf
+# -------------------------------------------------------------
+#
+# <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>
+
+frr version 10.5.3
+frr defaults traditional
+hostname {{ hostname }}
+service integrated-vtysh-config
+!
+interface gre1
+ ip ospf area 0.0.0.0
+ ip ospf network point-to-point
+ no ip ospf passive
+exit
+!
+interface gre2
+ ip ospf area 0.0.0.0
+ ip ospf network point-to-point
+ no ip ospf passive
+exit
+!
+interface vmx0
+ ip ospf area 0.0.0.0
+exit
+!
+router ospf
+ ospf router-id {{ router_id }}
+ passive-interface default
+exit
+!
diff --git a/roles/router/frrouting/files/frr.rc b/roles/router/frrouting/files/frr.rc
--- a/roles/router/frrouting/files/frr.rc
+++ b/roles/router/frrouting/files/frr.rc
@@ -3,7 +3,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/router/carp/files/frr.rc
+# Source file: roles/router/frrouting/files/frr.rc
# -------------------------------------------------------------
#
# <auto-generated>

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 25, 13:47 (22 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3648138
Default Alt Text
D4068.id10698.diff (2 KB)

Event Timeline