diff options
Diffstat (limited to 'manifests/defines/line.pp')
-rw-r--r-- | manifests/defines/line.pp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/manifests/defines/line.pp b/manifests/defines/line.pp index 42bd5a1..4cf8fba 100644 --- a/manifests/defines/line.pp +++ b/manifests/defines/line.pp @@ -25,15 +25,15 @@ # define line($file, $line, $ensure = 'present') { case $ensure { - default : { err ( "unknown ensure value $ensure" ) } + default : { err ( "unknown ensure value '${ensure}'" ) } present: { - exec { "/bin/echo '$line' >> '$file'": - unless => "/bin/grep -Fx '$line' '$file'" + exec { "/bin/echo '${line}' >> '${file}'": + unless => "/bin/grep -Fx '${line}' '${file}'" } } absent: { - exec { "/usr/bin/perl -ni -e 'print unless /^\\Q$line\\E$/' '$file'": - onlyif => "/bin/grep -Fx '$line' '$file'" + exec { "/usr/bin/perl -ni -e 'print unless /^\\Q${line}\\E\$/' '${file}'": + onlyif => "/bin/grep -Fx '${line}' '${file}'" } } } |