diff options
author | Jeff McCune <jeff@puppetlabs.com> | 2012-11-26 11:39:26 -0800 |
---|---|---|
committer | Jeff McCune <jeff@puppetlabs.com> | 2012-11-26 11:39:26 -0800 |
commit | b55994b2be55c3f03bc089449d07ecef69ec7638 (patch) | |
tree | f96e3c5a7c72ee528473cecf10e2439db49539ba /lib/puppet/type/file_line.rb | |
parent | 6c104e5e3ab8cc01749b52efcfd303d05a0964d4 (diff) | |
parent | d8cde952956e80eeae617469c59a3bbd61336e70 (diff) |
Merge branch 'fun/2.x/14670_file_line_autorequire' into 2.x
* fun/2.x/14670_file_line_autorequire:
(#14670) Fixup file_line autorequire specs
(#14670) autorequire a file_line resource's path
Diffstat (limited to 'lib/puppet/type/file_line.rb')
-rw-r--r-- | lib/puppet/type/file_line.rb | 5 |
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") |