Skip to content

Commit ab98142

Browse files
author
Ashley Penney
committed
Merge pull request #217 from teancom/fix/master/file_line
(DOCUMENT-21) add docs for file_line to README.markdown
2 parents 2435741 + dbba655 commit ab98142

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.markdown

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,26 @@ the type and parameters specified if it doesn't already exist.
305305

306306
- *Type*: statement
307307

308+
file_line
309+
---------
310+
This resource ensures that a given line is contained within a file. You can also use
311+
"match" to replace existing lines.
312+
313+
*Examples:*
314+
315+
file_line { 'sudo_rule':
316+
path => '/etc/sudoers',
317+
line => '%sudo ALL=(ALL) ALL',
318+
}
319+
320+
file_line { 'change_mount':
321+
path => '/etc/fstab',
322+
line => '10.0.0.1:/vol/data /opt/data nfs defaults 0 0',
323+
match => '^172.16.17.2:/vol/old',
324+
}
325+
326+
- *Type*: resource
327+
308328
flatten
309329
-------
310330
This function flattens any deeply nested arrays and returns a single flat array

0 commit comments

Comments
 (0)