Skip to content

Commit

Permalink
Merge pull request #2 from jfroche/feature/purge-unknown-ipset
Browse files Browse the repository at this point in the history
Add option to remove unknown ipsets
  • Loading branch information
jfroche authored Apr 19, 2018
2 parents ad8edb4 + 5ae166c commit 11f3fa8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,10 @@
Service['firewalld'] -> Firewalld_direct_rule <||> ~> Exec['firewalld::reload']
Service['firewalld'] -> Firewalld_direct_passthrough <||> ~> Exec['firewalld::reload']

if $purge_unknown_ipsets {
Firewalld_ipset <||>
~> resources { 'firewalld_ipset':
purge => true,
}
}
}
7 changes: 7 additions & 0 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
:purge_direct_rules => true,
:purge_direct_chains => true,
:purge_direct_passthroughs => true,
:purge_unknown_ipsets => true
}
end

Expand All @@ -47,6 +48,12 @@
it do
should contain_firewalld_direct_purge('chain')
end

it do
should contain_resources('firewalld_ipset')
.with_purge(true)
end

end

context 'with parameter ports' do
Expand Down

0 comments on commit 11f3fa8

Please sign in to comment.