Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F26651297
D4093.id10709.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
7 KB
Referenced Files
None
Subscribers
None
D4093.id10709.diff
View Options
diff --git a/roles/router/frrouting/config.sls b/pillar/core/frr.sls
rename from roles/router/frrouting/config.sls
rename to pillar/core/frr.sls
--- a/roles/router/frrouting/config.sls
+++ b/pillar/core/frr.sls
@@ -1,6 +1,13 @@
# -------------------------------------------------------------
-# Salt — Router — FRRouting
+# Pillar — FRRouting — Router/DevServer
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
+
+frrouting:
+ router_ids:
+ ysul: 4.4.4.4
+ windriver: 5.5.5.5
+ router-002: 2.2.2.2
+ router-003: 3.3.3.3
diff --git a/pillar/top.sls b/pillar/top.sls
--- a/pillar/top.sls
+++ b/pillar/top.sls
@@ -55,7 +55,14 @@
- mailserver.dovecot
- mailserver.postfix
+ router-002:
+ - core.frr
+
+ router-003:
+ - core.frr
+
ysul:
+ - core.frr
- devserver.repos
- saas.mediawiki
- webserver.labs
@@ -66,6 +73,7 @@
- saas.wordpress
windriver:
+ - core.frr
- devserver.datacubes
- devserver.ports
- devserver.repos
diff --git a/roles/core/frrouting/config.sls b/roles/core/frrouting/config.sls
new file mode 100644
--- /dev/null
+++ b/roles/core/frrouting/config.sls
@@ -0,0 +1,28 @@
+# -------------------------------------------------------------
+# Salt — Router/DevServer — FRRouting
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set roles = salt['grains.get']('roles', []) %}
+{% set router_ids = salt['pillar.get']('frrouting:router_ids', {}) %}
+
+{% if 'router' in roles %}
+{% set frr_template = 'salt://roles/core/frrouting/files/frr-router.conf' %}
+{% elif 'devserver' in roles %}
+{% set frr_template = 'salt://roles/core/frrouting/files/frr-devserver.conf' %}
+{% endif %}
+
+{% if 'router' in roles or 'devserver' in roles %}
+/usr/local/etc/frr/frr.conf:
+ file.managed:
+ - source: {{ frr_template }}
+ - template: jinja
+ - user: frr
+ - group: frr
+ - mode: 644
+ - context:
+ hostname: {{ grains['id'] }}
+ router_id: {{ router_ids.get(grains['id']) }}
+{% endif %}
diff --git a/roles/router/frrouting/files/frr.rc b/roles/core/frrouting/files/frr-devserver.conf
rename from roles/router/frrouting/files/frr.rc
rename to roles/core/frrouting/files/frr-devserver.conf
--- a/roles/router/frrouting/files/frr.rc
+++ b/roles/core/frrouting/files/frr-devserver.conf
@@ -1,9 +1,9 @@
# -------------------------------------------------------------
-# Network — Activate FRRouting with OSPF
+# Network — Configuration VRRouting with OSPF for DevServer
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/router/carp/files/frr.rc
+# Source file: roles/core/frrouting/files/frr-devserver.conf
# -------------------------------------------------------------
#
# <auto-generated>
@@ -13,5 +13,18 @@
# and will be lost if the state is redeployed.
# </auto-generated>
-frr_enable="YES"
-frr_daemons="zebra ospfd"
+frr version 10.6.0
+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
+!
+router ospf
+ ospf router-id {{ router_id }}
+exit
+!
diff --git a/roles/core/frrouting/files/frr-router.conf b/roles/core/frrouting/files/frr-router.conf
new file mode 100644
--- /dev/null
+++ b/roles/core/frrouting/files/frr-router.conf
@@ -0,0 +1,41 @@
+# -------------------------------------------------------------
+# Network — Configuration VRRouting with OSPF for Router
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/core/frrouting/files/frr-router.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.6.0
+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/core/frrouting/files/frr.rc
rename from roles/router/frrouting/files/frr.rc
rename to roles/core/frrouting/files/frr.rc
--- a/roles/router/frrouting/files/frr.rc
+++ b/roles/core/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/core/frrouting/files/frr.rc
# -------------------------------------------------------------
#
# <auto-generated>
diff --git a/roles/router/frrouting/init.sls b/roles/core/frrouting/init.sls
rename from roles/router/frrouting/init.sls
rename to roles/core/frrouting/init.sls
diff --git a/roles/router/frrouting/service.sls b/roles/core/frrouting/service.sls
rename from roles/router/frrouting/service.sls
rename to roles/core/frrouting/service.sls
--- a/roles/router/frrouting/service.sls
+++ b/roles/core/frrouting/service.sls
@@ -1,5 +1,5 @@
# -------------------------------------------------------------
-# Salt — Router — FRRouting
+# Salt — FRRouting
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
@@ -11,7 +11,7 @@
/etc/rc.conf.d/frr:
file.managed:
- - source: salt://roles/router/frrouting/files/frr.rc
+ - source: salt://roles/core/frrouting/files/frr.rc
- mode: 644
{% endif %}
diff --git a/roles/router/frrouting/software.sls b/roles/core/frrouting/software.sls
rename from roles/router/frrouting/software.sls
rename to roles/core/frrouting/software.sls
--- a/roles/router/frrouting/software.sls
+++ b/roles/core/frrouting/software.sls
@@ -1,5 +1,5 @@
# -------------------------------------------------------------
-# Salt — Router — FRRouting
+# Salt — FRRouting
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
diff --git a/roles/router/init.sls b/roles/router/init.sls
--- a/roles/router/init.sls
+++ b/roles/router/init.sls
@@ -7,4 +7,3 @@
include:
- .carp
- - .frrouting
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 25, 13:47 (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3658511
Default Alt Text
D4093.id10709.diff (7 KB)
Attached To
Mode
D4093: FRRouting : installation and configuration
Attached
Detach File
Event Timeline
Log In to Comment