Skip to content

Commit

Permalink
Add default ensure to present
Browse files Browse the repository at this point in the history
For all types
  • Loading branch information
jfroche committed Jan 23, 2020
1 parent 5615b53 commit 08c4f6b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
5 changes: 4 additions & 1 deletion lib/puppet/type/firewalld_direct_chain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"

ensurable
ensurable do
defaultvalues
defaultto :present
end

def self.title_patterns
[
Expand Down
5 changes: 4 additions & 1 deletion lib/puppet/type/firewalld_direct_passthrough.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
"

ensurable
ensurable do
defaultvalues
defaultto :present
end

newparam(:inet_protocol) do
desc 'Name of the TCP/IP protocol to use (e.g: ipv4, ipv6)'
Expand Down
5 changes: 4 additions & 1 deletion lib/puppet/type/firewalld_direct_rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"

ensurable
ensurable do
defaultvalues
defaultto :present
end

newparam(:name, namevar: :true) do
desc 'Name of the rule resource in Puppet'
Expand Down
5 changes: 4 additions & 1 deletion lib/puppet/type/firewalld_ipset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ def po2?(n)
n.to_s(2).count('1') == 1
end

ensurable
ensurable do
defaultvalues
defaultto :present
end

newparam(:name, namevar: true) do
desc 'Name of the IPset'
Expand Down
5 changes: 4 additions & 1 deletion lib/puppet/type/firewalld_rich_rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"

ensurable
ensurable do
defaultvalues
defaultto :present
end

newparam(:name) do
isnamevar
Expand Down
5 changes: 4 additions & 1 deletion lib/puppet/type/firewalld_zone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
"

ensurable
ensurable do
defaultvalues
defaultto :present
end

# When set to 1 these variables cause the purge_* options to indicate to Puppet
# that we are in a changed state
Expand Down

0 comments on commit 08c4f6b

Please sign in to comment.