Skip to content
Snippets Groups Projects
Unverified Commit d858673b authored by Max Adamo's avatar Max Adamo
Browse files

fixed against puppet-lint

parent c1c653e2
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,6 @@
# Please check the main README: ../README.md
#
function fw_builder::fw_builder() {
# time to retrieve hieradata for the firewall
#
$fw_conf = lookup('firewall', Hash, 'deep')
......
......@@ -23,7 +23,7 @@ function fw_builder::fw_builder_public_ips(
Variant[String, Hash, Undef] $facts_fw_conf,
Optional[Array] $facts_ipsets
) >> Array {
#
# when puppet runs for the first time these facts are not available
if $facts_fw_conf =~ Undef or $facts_ipsets =~ Undef {
$public_ipsets = []
......
......@@ -20,7 +20,6 @@
# IPs with subnet
#
function fw_builder::parser(Array $ip_array) >> Array {
if $ip_array.length > 0 {
$unflattened_cidr_array = $ip_array.map |$ip| {
if $ip =~ Stdlib::IP::Address::V4::Nosubnet {
......
......@@ -15,7 +15,6 @@ class fw_builder::chains (
$ipv4_enable = $fw_builder::params::ipv4_enable,
$ipv6_enable = $fw_builder::params::ipv6_enable
) {
assert_private()
$fw_builder::ip_proto_array.each | String $provider | {
......@@ -83,6 +82,5 @@ class fw_builder::chains (
}
}
}
}
# vim:ts=2:sw=2
......@@ -16,7 +16,6 @@
# ADD SUPPORT FOR IPv6
#
class fw_builder::docker {
assert_private()
firewallchain { ['INPUT:filter:IPv4', 'OUTPUT:filter:IPv4']:
......@@ -57,6 +56,5 @@ class fw_builder::docker {
]:
purge => false,
}
}
# vim:ts=2:sw=2
......@@ -45,7 +45,6 @@ class fw_builder (
Optional[String] $limit = $fw_builder::params::limit,
$ipset_package_ensure = $fw_builder::params::ipset_package_ensure
) inherits fw_builder::params {
if ! ($purge_rules) and ($manage_docker) {
fail('cannot set purge_rules to false and manage_docker to true')
} elsif ! ($ipv4_enable) and ! ($ipv6_enable) {
......@@ -101,5 +100,4 @@ class fw_builder (
}
}
}
}
......@@ -5,7 +5,6 @@ class fw_builder::ipset (
$ipv4_enable = $fw_builder::params::ipv4_enable,
$ipv6_enable = $fw_builder::params::ipv6_enable
) {
assert_private()
$trusted_net = $fw_builder::trusted_networks
......@@ -44,6 +43,5 @@ class fw_builder::ipset (
options => {'family' => 'inet6'}
}
}
}
# vim:ts=2:sw=2
......@@ -9,7 +9,6 @@ class fw_builder::logrotate (
$logging = $fw_builder::params::logging,
$log_rotation_days = $fw_builder::params::log_rotation_days
) {
assert_private()
file { ['/var/log/iptables.log', '/var/log/ip6tables.log']: ensure => file; }
......@@ -25,5 +24,4 @@ class fw_builder::logrotate (
path => '/var/log/ip*tables.log';
}
}
}
......@@ -6,7 +6,6 @@
# Massimiliano Adamo<massimiliano.adamo@geant.org>
#
class fw_builder::params {
# whether to purge rule not defined in puppet
$purge_rules = true
......@@ -30,5 +29,4 @@ class fw_builder::params {
# whether to limit RST and dropped connections on post.pp
$limit = '1000/sec'
}
......@@ -3,7 +3,6 @@
class fw_builder::post (
$logging = $fw_builder::params::logging
) {
assert_private()
if ($logging) {
......@@ -38,6 +37,5 @@ class fw_builder::post (
action => 'drop';
}
}
}
# vim:ts=2:sw=2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment