diff options
author | Raymond Maika <rmaika@patientway.com> | 2015-07-30 14:05:39 -0400 |
---|---|---|
committer | Raymond Maika <raymond.maika@cengn.ca> | 2015-07-30 14:55:32 -0400 |
commit | 35e92645f727f02ef9ace8948154079bc0fff05a (patch) | |
tree | 1d9c42cc6ea5a89b159cdd1329aedd7c502bb699 /lib/puppet/type | |
parent | 4d889cbcb6f5eb2358eed940f2d40d1f73cc8f51 (diff) | |
download | puppet-stdlib-35e92645f727f02ef9ace8948154079bc0fff05a.tar.gz puppet-stdlib-35e92645f727f02ef9ace8948154079bc0fff05a.tar.bz2 |
(MODULES-2024) Adding replace attribute to file_line
Diffstat (limited to 'lib/puppet/type')
-rw-r--r-- | lib/puppet/type/file_line.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb index 29f9538..190105c 100644 --- a/lib/puppet/type/file_line.rb +++ b/lib/puppet/type/file_line.rb @@ -1,3 +1,4 @@ +require 'puppet/parameter/boolean' Puppet::Type.newtype(:file_line) do desc <<-EOT @@ -78,6 +79,11 @@ Puppet::Type.newtype(:file_line) do end end + newparam(:replace, :boolean => true, :parent => Puppet::Parameter::Boolean) do + desc 'If true, replace line that matches. If false, do not write line if a match is found' + defaultto true + end + # Autorequire the file resource if it's being managed autorequire(:file) do self[:path] |