summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorEric Putnam <putnam.eric@gmail.com>2017-07-26 11:51:10 -0700
committerGitHub <noreply@github.com>2017-07-26 11:51:10 -0700
commitd65a144aea0cd73f4aaa0cef15c74414baba5c8d (patch)
tree24e6a37d40538ad62db736c227f4f7438495d042 /README.md
parent4a658957db669efef666feb61b5d5c1406d105e9 (diff)
parent703fa777e1daee97e2aea529064d773662ef1fe0 (diff)
Merge pull request #717 from ripclawffb/filelineoption
Add new file_line option append_on_no_match
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2b1e005..629b252 100644
--- a/README.md
+++ b/README.md
@@ -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