Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3769741
routes.sls
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
routes.sls
View Options
# -------------------------------------------------------------
# Salt — Network
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{%
from
"roles/core/network/map.jinja"
import
routes_config
with context
%}
# -------------------------------------------------------------
# Routes
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{
routes_config
[
"config_path"
]
}}
:
file.managed
:
-
source
:
salt://roles/core/network/files/
{{
routes_config
[
"source_path"
]
}}
-
makedirs
:
True
-
template
:
jinja
-
context
:
routes
:
{{
salt
[
"node.get_routes"
]()
}}
# -------------------------------------------------------------
# Enable packet forwarding for routers
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{%
if
salt
[
'node.has_role'
](
"router"
)
%}
{%
if
grains
[
'os'
]
==
'FreeBSD'
%}
/etc/rc.conf.d/routing/router
:
file.managed
:
-
source
:
salt://roles/core/network/files/FreeBSD/router.rc
-
makedirs
:
True
{%
endif
%}
{%
endif
%}
# -------------------------------------------------------------
# Systemd unit for Linux systems using our /etc/routes.conf
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{%
if
routes_config
[
"provider"
]
==
"custom-service"
%}
/usr/sbin/routes
:
file.managed
:
-
source
:
salt://roles/core/network/files/Linux/routes.sh
-
mode
:
755
/etc/systemd/system/routes.service
:
file.managed
:
-
source
:
salt://roles/core/network/files/Linux/routes.service
service.running
:
-
name
:
routes
-
enable
:
true
{%
endif
%}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 16:44 (22 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260583
Default Alt Text
routes.sls (1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment