Skip to content

Commit

Permalink
modify type for new provider
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonHoenscheid committed Aug 1, 2023
1 parent ad8f029 commit ffd99c6
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/puppet/type/postgresql_conf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

Puppet::Type.newtype(:postgresql_conf) do
@doc = 'This type allows puppet to manage postgresql.conf parameters.'

ensurable

newparam(:name) do
desc 'A unique title for the resource.'

newvalues(%r{^[\w.]+$})
end

Expand All @@ -21,13 +19,7 @@
end

newproperty(:target) do
desc 'The path to postgresql.conf'
defaultto do
if @resource.class.defaultprovider.ancestors.include?(Puppet::Provider::ParsedFile)
@resource.class.defaultprovider.default_target
else
nil
end
end
desc 'The path to the postgresql config file'
newvalues(%r{^\/[a-z0-9]+[a-z0-9(\/)(\-)]*[\w]+.conf$})
end
end

0 comments on commit ffd99c6

Please sign in to comment.