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
b64a9c9d
Commit
b64a9c9d
authored
Dec 08, 2020
by
mh
Browse files
add munin rules
parent
b28b576a
Changes
1
Show whitespace changes
Inline
Side-by-side
manifests/rules/munin.pp
0 → 100644
View file @
b64a9c9d
# 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
,
Enum
[
'loc'
,
'net'
]
$collector_source
=
'net'
,
){
include
firewall
if
$firewall::use_nftables
{
if
!
empty
(
$munin_collector
)
{
nftables::rule
{
'default_in-munin-ipv4'
:
content
=>
"ip saddr {
$
{munin_collector.join(',')}} tcp dport
${munin_port}
accept"
,
}
}
if
!
empty
(
$munin_collector6
)
{
nftables::rule
{
'default_in-munin-ipv6'
:
content
=>
"ip6 saddr {
$
{munin_collector6.join(',')}} tcp dport
${munin_port}
accept"
,
}
}
}
else
{
class
{
'firewall::rules::munin'
:
munin_port
=>
$port
,
munin_collector
=>
$munin_collector
,
munin_collector6
=>
$munin_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