Skip to content

Commit ffd99c6

Browse files
modify type for new provider
1 parent ad8f029 commit ffd99c6

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/puppet/type/postgresql_conf.rb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
Puppet::Type.newtype(:postgresql_conf) do
44
@doc = 'This type allows puppet to manage postgresql.conf parameters.'
5-
65
ensurable
76

87
newparam(:name) do
98
desc 'A unique title for the resource.'
10-
119
newvalues(%r{^[\w.]+$})
1210
end
1311

@@ -21,13 +19,7 @@
2119
end
2220

2321
newproperty(:target) do
24-
desc 'The path to postgresql.conf'
25-
defaultto do
26-
if @resource.class.defaultprovider.ancestors.include?(Puppet::Provider::ParsedFile)
27-
@resource.class.defaultprovider.default_target
28-
else
29-
nil
30-
end
31-
end
22+
desc 'The path to the postgresql config file'
23+
newvalues(%r{^\/[a-z0-9]+[a-z0-9(\/)(\-)]*[\w]+.conf$})
3224
end
3325
end

0 commit comments

Comments
 (0)