diff --git a/manifests/firewall.pp b/manifests/firewall.pp index 38b0fa3..406facb 100644 --- a/manifests/firewall.pp +++ b/manifests/firewall.pp @@ -2,12 +2,23 @@ assert_private("Use of private class ${name} by ${caller_module_name}") - if $nginx::firewall_manage and defined('::firewall') { + if $nginx::firewall_manage { $nginx::service_ports.each |$port, $proto| { - firewall { "${port} Allow inbound ${proto} connection on port: ${port}": - dport => $port, - proto => $proto, - action => accept, + if defined('::firewall') { + firewall { "${port} - NGINX - Allow inbound ${proto} connection on port: ${port}": + dport => $port, + proto => $proto, + action => accept, + } + } + + if defined('::ferm') { + ferm::rule { "NGINX - Allow inbound ${proto} connection on port: ${port}": + chain => 'INPUT', + proto => $proto, + dport => "(${port})", + action => 'ACCEPT', + } } } } diff --git a/spec/acceptance/nodesets/default.yml b/spec/acceptance/nodesets/default.yml deleted file mode 100644 index dba339c..0000000 --- a/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-1404-x64: - roles: - - agent - - default - platform: ubuntu-14.04-amd64 - hypervisor: vagrant - box: puppetlabs/ubuntu-14.04-64-nocm -CONFIG: - type: foss