diff options
author | TP Honey <tphoney@users.noreply.github.com> | 2015-10-14 12:46:19 +0100 |
---|---|---|
committer | TP Honey <tphoney@users.noreply.github.com> | 2015-10-14 12:46:19 +0100 |
commit | 5b3c623394e405ca0db5e707554a91b4252bbbad (patch) | |
tree | b0ad10cec21ec8d9d25e58d7b78a58a7751e81d4 /lib | |
parent | 4e62223801d118bb427a230b4571a911399ea859 (diff) | |
parent | ad173f2d0552ad9ed42950aea7df8d2b22677904 (diff) |
Merge pull request #536 from DavidS/improve-file_line-docs
(MODULES-2421) improve description of file_line
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/type/file_line.rb | 11 |
1 files changed, 5 insertions, 6 deletions
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 |