Skip to content

Commit dbba655

Browse files
committed
(DOCUMENT-21) add docs for file_line to README.markdown
Without this, you have to look at the source file (lib/puppet/type/file_line.rb) to know what it does. This adds that documentation.
1 parent 2c8450d commit dbba655

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

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)