Commit 92810ae1 authored by mh's avatar mh
Browse files

better naming

parent 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,
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{'firewall::rules::munin':
class{'shorewall::rules::munin':
munin_port => $port,
munin_collector => $munin_collector,
munin_collector6 => $munin_collector6,
munin_collector => $collector,
munin_collector6 => $collector6,
collector_source => $collector_source,
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment