diff options
author | asif.shaikh <ripclaw_ffb@hotmail.com> | 2017-02-01 20:14:27 -0800 |
---|---|---|
committer | Eric Putnam <putnam.eric@gmail.com> | 2017-07-18 14:24:43 -0700 |
commit | 703fa777e1daee97e2aea529064d773662ef1fe0 (patch) | |
tree | 74b26c4edd0858327d670ae39689e5b22c806ce4 /README.md | |
parent | 596878a7bc1fd4a64da89c5c760accb3e8178ec1 (diff) |
Add new file_line option append_on_no_match
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -115,6 +115,18 @@ file_line { 'bashrc_proxy': In the example above, `match` looks for a line beginning with 'export' followed by 'HTTP_PROXY' and replaces it with the value in line. +Match Example: + + file_line { 'bashrc_proxy': + ensure => present, + path => '/etc/bashrc', + line => 'export HTTP_PROXY=http://squid.puppetlabs.vm:3128', + match => '^export\ HTTP_PROXY\=', + append_on_no_match => false, + } + +In this code example, `match` looks for a line beginning with export followed by HTTP_PROXY and replaces it with the value in line. If a match is not found, then no changes are made to the file. + Match Example with `ensure => absent`: ```puppet |