diff options
author | Alex O'Rielly <aorielly@gmail.com> | 2013-06-21 17:33:44 -0500 |
---|---|---|
committer | Adrien Thebo <git@somethingsinistral.net> | 2013-07-11 16:25:56 -0700 |
commit | 964a9ad6193b0dd243a44ddae1509655fc9e9fb8 (patch) | |
tree | 415b40d4bcdf9ffca0513154ed3ffd454107da91 /lib/puppet/type | |
parent | ca7633c0e4830edb0dab4dc31609086eb7edba67 (diff) | |
download | puppet-stdlib-964a9ad6193b0dd243a44ddae1509655fc9e9fb8.tar.gz puppet-stdlib-964a9ad6193b0dd243a44ddae1509655fc9e9fb8.tar.bz2 |
(#21416) Allow file_line to match multiple lines
Without this commit the file_line type will outright fail if multiple
lines match the given regex. This commit allows the file_line type and
provider to optionally match and modify all matching lines.
Changeset rebased into a single commit by Adrien Thebo <adrien@puppetlabs.com>
Diffstat (limited to 'lib/puppet/type')
-rw-r--r-- | lib/puppet/type/file_line.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb index f71a4bc..14946bb 100644 --- a/lib/puppet/type/file_line.rb +++ b/lib/puppet/type/file_line.rb @@ -37,6 +37,11 @@ Puppet::Type.newtype(:file_line) do 'if a match is found, we replace that line rather than adding a new line.' end + newparam(:multiple) do + desc 'An optional value to determine if match can change multiple lines.' + newvalues(true, false) + end + newparam(:line) do desc 'The line to be appended to the file located by the path parameter.' end |