diff options
author | TP Honey <tphoney@users.noreply.github.com> | 2017-07-07 17:10:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-07 17:10:56 +0100 |
commit | 0001566cb17e0dd40c7a8a88507641aed96a8fa8 (patch) | |
tree | 14bf592ba899b9fa688fbe33a716d4a3254a1d6f | |
parent | 4a980fc92233f2d9ee32e5628522aef3b870896e (diff) | |
parent | ec6cd56576953c74b48ebbba477d89e138e91ace (diff) |
Merge pull request #786 from reidmv/MODULES-5113
(MODULES-5113) Make line support Sensitive
-rw-r--r-- | lib/puppet/type/file_line.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb index e82b246..3d691bf 100644 --- a/lib/puppet/type/file_line.rb +++ b/lib/puppet/type/file_line.rb @@ -104,8 +104,16 @@ Puppet::Type.newtype(:file_line) do ' This is also takes a regex.' end - newparam(:line) do + # The line property never changes; the type only ever performs a create() or + # destroy(). line is a property in order to allow it to correctly handle + # Sensitive type values. Because it is a property which will never change, + # it should never be considered out of sync. + newproperty(:line) do desc 'The line to be appended to the file or used to replace matches found by the match attribute.' + + def retrieve + @resource[:line] + end end newparam(:path) do |