Commit 8d001067 authored by mh's avatar mh
Browse files

add dispatch class for ibackup

parent 9aa89dbc
# manage firewall for outgoing ssh
class firewall::rules::out::ibackup(
Array[Stdlib::IP::Address::Nosubnet] $backup_hosts,
){
include firewall
if $firewall::use_nftables {
$backup_hosts.each |$index,$ip| {
if $ip =~ Stdlib::IP::Address::V4::Nosubnet {
$dest = "ip daddr ${ip}"
} else {
$dest = "ip6 daddr ${ip}"
}
nftables::rule {
"default_out-ssh_ibackup-${index}":
content => "${dest} tcp dport 22 accept",
}
}
} else {
class{'shorewall::rules::out::ibackup':
backup_hosts => $backup_hosts,
}
}
}
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