Skip to content

Commit

Permalink
- Apply firewall rules if ferm is defined as firewall manager. It u…
Browse files Browse the repository at this point in the history
…ses module https://forge.puppet.com/puppet/ferm for managing ferm.

- Updated Firewall comment messages
- Removed unused test files
  • Loading branch information
rehanone committed May 6, 2020
1 parent f4f4f32 commit 794be5c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
21 changes: 16 additions & 5 deletions manifests/firewall.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}
}
}
}
Expand Down
10 changes: 0 additions & 10 deletions spec/acceptance/nodesets/default.yml

This file was deleted.

0 comments on commit 794be5c

Please sign in to comment.