Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3938417
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
"router"
in
salt
[
'node.get_list'
](
'roles'
)
%}
{%
if
grains
[
'os'
]
==
'FreeBSD'
%}
/etc/rc.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
Thu, Dec 26, 01:57 (5 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2310419
Default Alt Text
routes.sls (1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment