Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3770322
ipv4.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
ipv4.sls
View Options
# -------------------------------------------------------------
# Salt — Network
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2016-06-15
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{%
from
"roles/core/network/map.jinja"
import
interface_config
with context
%}
{%
set
network
=
salt
[
'node.get'
](
'network'
)
%}
# -------------------------------------------------------------
# Interface
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{%
for
interface_name
,
interface
in
network
[
"interfaces"
]
.items
()
%}
{%
if
"skip_interface_configuration"
not
in
interface.get
(
"flags"
,
[])
%}
network_ipv4_
{{
interface_name
}}
:
file.managed
:
{%
if
interface_config
[
"suffix"
]
==
"interface"
%}
-
name
:
{{
interface_config
[
"config_path"
]
}}{{
interface_name
}}
{%
else
%}
-
name
:
{{
interface_config
[
"config_path"
]
}}{{
interface
[
"device"
]
}}
{%
endif
%}
-
source
:
salt://roles/core/network/files/
{{
interface_config
[
"source_path"
]
}}
-
makedirs
:
True
-
template
:
jinja
-
defaults
:
interface
:
{{
interface
}}
{%
if
grains
[
'os_family'
]
==
'RedHat'
%}
prefix
:
{{
salt
[
'network_utils.netmask_to_cidr_prefix'
](
interface
[
'ipv4'
][
'netmask'
])
}}
{%
endif
%}
{%
endif
%}
{%
endfor
%}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 19:50 (6 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260885
Default Alt Text
ipv4.sls (1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment