Adding delete_lines
This commit is contained in:
parent
0f5508374a
commit
a25d1e44c2
1 changed files with 5 additions and 0 deletions
5
manifests/defines/delete_lines.pp
Normal file
5
manifests/defines/delete_lines.pp
Normal file
|
@ -0,0 +1,5 @@
|
|||
define delete_lines($file, $pattern) {
|
||||
exec { "/bin/sed -i -r -e '/$pattern/d' $file":
|
||||
onlyif => "/bin/grep -E '$pattern' '$file'",
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue