From ad173f2d0552ad9ed42950aea7df8d2b22677904 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Tue, 13 Oct 2015 15:02:04 +0100 Subject: (MODULES-2421) improve description of file_line This mostly needed extraction of the existing doc strings from the type. --- lib/puppet/type/file_line.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/puppet') diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb index 446f103..77d3be2 100644 --- a/lib/puppet/type/file_line.rb +++ b/lib/puppet/type/file_line.rb @@ -4,7 +4,7 @@ Puppet::Type.newtype(:file_line) do Ensures that a given line is contained within a file. The implementation matches the full line, including whitespace at the beginning and end. If the line is not contained in the given file, Puppet will append the line to - the end of the file to ensure the desired state. Multiple resources may + the end of the file to ensure the desired state. Multiple resources may be declared to manage multiple lines in the same file. Example: @@ -31,7 +31,7 @@ Puppet::Type.newtype(:file_line) do match => '^export\ HTTP_PROXY\=', } - In this code example match will look for a line beginning with export + In this code example match will look for a line beginning with export followed by HTTP_PROXY and replace it with the value in line. Match Example With `ensure => absent`: @@ -50,7 +50,6 @@ Puppet::Type.newtype(:file_line) do **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 @@ -63,10 +62,10 @@ Puppet::Type.newtype(:file_line) do end newparam(:match) do - desc 'An optional ruby regular expression to run against existing lines in the file.' + + desc 'An optional ruby regular expression to run against existing lines in the file.' + ' If a match is found, we replace that line rather than adding a new line.' + - ' A regex comparisson is performed against the line value and if it does not' + - ' match an exception will be raised. ' + ' A regex comparison is performed against the line value and if it does not' + + ' match an exception will be raised.' end newparam(:match_for_absence) do -- cgit v1.2.3