summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/type/file_line.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb
index 9f03771..8559cfa 100644
--- a/lib/puppet/type/file_line.rb
+++ b/lib/puppet/type/file_line.rb
@@ -23,18 +23,20 @@ Puppet::Type.newtype(:file_line) do
EOT
- ensurable
+ ensurable do
+ defaultto :present
+ 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}'")