comment_line
Table of Contents
- Description
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
Comment/uncomment a line a file using Puppet (via awk
).
Usage
Commenting
comment_line { "/foo/bar bar":
ensure => commented
path => "/foo/bar",
match => "bar",
}
Comment all lines matching /bar/
in the file /foo/bar
Uncommenting
comment_line { "/foo/bar bam":
ensure => uncommented
path => "/foo/bar",
match => "bam",
}
Uncomment all lines matching /bam/
in the file /foo/bar
Reference
Defined types
- comment_line - Comment out a line matching regexp
Limitations
- Requires
awk
- Not supported by Puppet, Inc.
Development
PRs accepted :)
Testing
This module supports testing using PDQTest.
Test can be executed with:
bundle install
bundle exec pdqtest all
See .travis.yml
for a working CI example