zulip/puppet/puppet-common/manifests/append_if_no_such_line.pp

9 lines
267 B
ObjectPascal
Raw Normal View History

define common::append_if_no_such_line($file, $line, $refreshonly = 'false') {
exec { "/bin/echo '$line' >> '$file'":
unless => "/bin/grep -Fxqe '$line' '$file'",
path => "/bin",
refreshonly => $refreshonly,
subscribe => File[$file],
}
}