summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorHailee Kenney <hailee@puppetlabs.com>2016-10-06 15:23:35 -0700
committerHailee Kenney <hailee@puppetlabs.com>2016-10-06 15:31:47 -0700
commitbcab71ded8507de4fd9f89b4dcf798b3d98ace59 (patch)
treea2c2689d612e142f821492fda11ef4e9a55e204a /README.markdown
parentc046716de30c55662cff0d11efa573f0d572d984 (diff)
(MODULES-3590) Fix match_for_absence parameter
Prior to this commit, due to a bug in the exists? method in the file_line provider, match_for_absence didn't work as described (or at all really). Update the exists? logic so that match_for_absence works as described. Additionally add a unit test to prevent regressions and update the documentation for the parameter to reflect the fact that it is ignored when `ensure => present`.
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown
index d27668b..34d26a8 100644
--- a/README.markdown
+++ b/README.markdown
@@ -128,7 +128,7 @@ All parameters are optional, unless otherwise noted.
* `ensure`: Ensures whether the resource is present. Valid options: 'present', 'absent'. Default: 'present'.
* `line`: **Required.** Sets the line to be added to the file located by the `path` parameter. Valid options: String. Default: Undefined.
* `match`: Specifies a regular expression to run against existing lines in the file; if a match is found, it is replaced rather than adding a new line. A regex comparison is performed against the line value, and if it does not match, an exception is raised. Valid options: String containing a regex. Default: Undefined.
-* `match_for_absence`: An optional value to determine if match should be applied when `ensure => absent`. If set to true and match is set, the line that matches match will be deleted. If set to false (the default), match is ignored when `ensure => absent` and the value of `line` is used instead. Default: false.
+* `match_for_absence`: An optional value to determine if match should be applied when `ensure => absent`. If set to true and match is set, the line that matches match will be deleted. If set to false (the default), match is ignored when `ensure => absent` and the value of `line` is used instead. Ignored when `ensure => present`. Default: false.
* `multiple`: Determines if `match` and/or `after` can change multiple lines. If set to false, an exception will be raised if more than one line matches. Valid options: 'true', 'false'. Default: Undefined.
* `name`: Sets the name to use as the identity of the resource. This is necessary if you want the resource namevar to differ from the supplied `title` of the resource. Valid options: String. Default: Undefined.
* `path`: **Required.** Defines the file in which Puppet will ensure the line specified by `line`. Must be an absolute path to the file.