Skip to content

Commit

Permalink
Try to fix ordering with ipsets
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpunk committed Feb 2, 2024
1 parent dfe2ab6 commit 2adb4ac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/puppet/type/firewalld_zone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#
Puppet::Type.type(:firewalld_rich_rule)
Puppet::Type.type(:firewalld_service)
Puppet::Type.type(:firewalld_ipset)
Puppet::Type.type(:firewalld_port)

desc <<-DOC
Expand Down Expand Up @@ -211,6 +212,17 @@ def retrieve
['firewalld']
end

autorequire(:firewalld_ipset) do
ipsets = []
if self[:sources]
(self[:sources]).each do |source|
ipsets.append(source.sub('ipset:', '')) if source.start_with?('ipset:')
end
end

ipsets
end

def purge_resource(res_type)
if Puppet.settings[:noop] || self[:noop]
Puppet.debug "Would have purged #{res_type.ref}, (noop)"
Expand Down

0 comments on commit 2adb4ac

Please sign in to comment.