mirror of https://github.com/zulip/zulip.git
puppet: Make common::line use absolute paths
(imported from commit c9a3b184433709361243d5c3af13d290cc710ecf)
This commit is contained in:
parent
3e7a6619bd
commit
10f3853abd
|
@ -27,13 +27,13 @@ define common::line($file, $line, $ensure = 'present') {
|
||||||
case $ensure {
|
case $ensure {
|
||||||
default : { err ( "unknown ensure value '${ensure}'" ) }
|
default : { err ( "unknown ensure value '${ensure}'" ) }
|
||||||
present: {
|
present: {
|
||||||
exec { "echo '${line}' >> '${file}'":
|
exec { "/bin/echo '${line}' >> '${file}'":
|
||||||
unless => "grep -qFx '${line}' '${file}'"
|
unless => "/bin/grep -qFx '${line}' '${file}'"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
absent: {
|
absent: {
|
||||||
exec { "perl -ni -e 'print if \$_ ne \"${line}\n\";' '${file}'":
|
exec { "/usr/bin/perl -ni -e 'print if \$_ ne \"${line}\n\";' '${file}'":
|
||||||
onlyif => "grep -qFx '${line}' '${file}'"
|
onlyif => "/bin/grep -qFx '${line}' '${file}'"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue