Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
immerda
Puppet Modules
firewall
Commits
92810ae1
Commit
92810ae1
authored
Dec 08, 2020
by
mh
Browse files
better naming
parent
b64a9c9d
Changes
1
Show whitespace changes
Inline
Side-by-side
manifests/rules/munin.pp
View file @
92810ae1
# dispatch munin rules
class
firewall::rules::munin
(
Array
[
Stdlib
::
IP
::
Address
::
V4
]
$
munin_
collector
=
[],
Array
[
Stdlib
::
IP
::
Address
::
V6
]
$
munin_
collector6
=
[],
Stdlib
::
Port
$
munin_
port
=
4949
,
Array
[
Stdlib
::
IP
::
Address
::
V4
]
$collector
=
[],
Array
[
Stdlib
::
IP
::
Address
::
V6
]
$collector6
=
[],
Stdlib
::
Port
$port
=
4949
,
Enum
[
'loc'
,
'net'
]
$collector_source
=
'net'
,
){
include
firewall
if
$firewall::use_nftables
{
if
!
empty
(
$
munin_
collector
)
{
if
!
empty
(
$collector
)
{
nftables::rule
{
'default_in-munin-ipv4'
:
content
=>
"ip saddr {
$
{
munin_
collector.join(',')}} tcp dport
${
munin_
port}
accept"
,
content
=>
"ip saddr {
$
{collector.join(',')}} tcp dport
${port}
accept"
,
}
}
if
!
empty
(
$
munin_
collector6
)
{
if
!
empty
(
$collector6
)
{
nftables::rule
{
'default_in-munin-ipv6'
:
content
=>
"ip6 saddr {
$
{
munin_
collector6.join(',')}} tcp dport
${
munin_
port}
accept"
,
content
=>
"ip6 saddr {
$
{collector6.join(',')}} tcp dport
${port}
accept"
,
}
}
}
else
{
class
{
'
fi
rewall::rules::munin'
:
class
{
'
sho
rewall::rules::munin'
:
munin_port
=>
$port
,
munin_collector
=>
$
munin_
collector
,
munin_collector6
=>
$
munin_
collector6
,
munin_collector
=>
$collector
,
munin_collector6
=>
$collector6
,
collector_source
=>
$collector_source
,
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment