diff options
Diffstat (limited to 'lib/puppet/type')
-rw-r--r-- | lib/puppet/type/file_line.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb index 8b45897..f6fe1d0 100644 --- a/lib/puppet/type/file_line.rb +++ b/lib/puppet/type/file_line.rb @@ -24,22 +24,20 @@ Puppet::Type.newtype(:file_line) do EOT ensurable do + defaultvalues defaultto :present - newvalue(:present) do - provider.create - end end newparam(:name, :namevar => true) do - desc 'arbitrary name used as identity' + desc 'An arbitrary name used as the identity of the resource.' end newparam(:line) do - desc 'The line to be appended to the path.' + desc 'The line to be appended to the file located by the path parameter.' end newparam(:path) do - desc 'File to possibly append a line to.' + desc 'The file Puppet will ensure contains the line specified by the line parameter.' validate do |value| unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/)) raise(Puppet::Error, "File paths must be fully qualified, not '#{value}'") |