summaryrefslogtreecommitdiff
path: root/lib/puppet/type/file_line.rb
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2015-01-27 15:14:18 -0500
committerMicah Anderson <micah@riseup.net>2015-01-27 15:14:18 -0500
commit71123634744b9fe2ec7d6a3e38e9789fd84801e3 (patch)
tree1794e812d83facd93b3007c42632c63ddf1eb2fc /lib/puppet/type/file_line.rb
parent71cb0f4c2c3bf95f62c9f189f5cef155b09a9682 (diff)
parent5863ab3901368310186790980aea2b0bf7cecb06 (diff)
Merge branch 'master' into leap
Diffstat (limited to 'lib/puppet/type/file_line.rb')
-rw-r--r--lib/puppet/type/file_line.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb
index 14946bb..df263e6 100644
--- a/lib/puppet/type/file_line.rb
+++ b/lib/puppet/type/file_line.rb
@@ -21,6 +21,9 @@ Puppet::Type.newtype(:file_line) do
In this example, Puppet will ensure both of the specified lines are
contained in the file /etc/sudoers.
+ **Autorequires:** If Puppet is managing the file that will contain the line
+ being managed, the file_line resource will autorequire that file.
+
EOT
ensurable do
@@ -42,6 +45,10 @@ Puppet::Type.newtype(:file_line) do
newvalues(true, false)
end
+ newparam(:after) do
+ desc 'An optional value used to specify the line after which we will add any new lines. (Existing lines are added in place)'
+ end
+
newparam(:line) do
desc 'The line to be appended to the file located by the path parameter.'
end
@@ -64,12 +71,5 @@ Puppet::Type.newtype(:file_line) do
unless self[:line] and self[:path]
raise(Puppet::Error, "Both line and path are required attributes")
end
-
- if (self[:match])
- unless Regexp.new(self[:match]).match(self[:line])
- raise(Puppet::Error, "When providing a 'match' parameter, the value must be a regex that matches against the value of your 'line' parameter")
- end
- end
-
end
end