summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeff McCune <jeff@puppetlabs.com>2012-11-26 11:41:01 -0800
committerJeff McCune <jeff@puppetlabs.com>2012-11-26 11:41:01 -0800
commit0648148bfb70159dcf2eb2af3d8e67842ce96f85 (patch)
treebfff79695287950689959ffae1f36819fda4b0aa /lib
parentad262b56a432a17bfde66f39b3d6042e2a35eea0 (diff)
parentb55994b2be55c3f03bc089449d07ecef69ec7638 (diff)
downloadpuppet-stdlib-0648148bfb70159dcf2eb2af3d8e67842ce96f85.tar.gz
puppet-stdlib-0648148bfb70159dcf2eb2af3d8e67842ce96f85.tar.bz2
Merge branch '2.x' into 3.x
* 2.x: (#14670) Fixup file_line autorequire specs (#14670) autorequire a file_line resource's path
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/type/file_line.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb
index 6b35902..f71a4bc 100644
--- a/lib/puppet/type/file_line.rb
+++ b/lib/puppet/type/file_line.rb
@@ -50,6 +50,11 @@ Puppet::Type.newtype(:file_line) do
end
end
+ # Autorequire the file resource if it's being managed
+ autorequire(:file) do
+ self[:path]
+ end
+
validate do
unless self[:line] and self[:path]
raise(Puppet::Error, "Both line and path are required attributes")