Dear all,
I was tying set up some cron jobs to do some file-system check. So, I
defined a "file" like this:
--------------------------------------------------------------------
define cron_job( $enable='true', $ival='d', $t='', $u='root', $c='',
$l="/var/log/$name.log", $o='2>&1', $pkg='' ) {
file { "/etc/cron.$ival/$name":
content => "$t $u $c $l $o\n",
ensure => $enable ? {
"false" => absent,
default => file,
},
force => true,
owner => root,
group => root,
mode => $ival ? {
"d" => 644,
default => 755,
},
require => $pkg ? {
"" => undef,
default => Package[$pkg],
},
}
}
# create the cron-job
class zfs::cronjob {
cron_job { 'zfs-check':
t => '43 3 * * *',
c => '/etc/zfs/check_zfs.sh myfile.ac.uk',
pkg => 'zfs';
}
}
---------------------------------------------------------------------
This writes a line like
"43 3 * * * root /etc/zfs/check_zfs.sh myfile.ac.uk /var/
log/zfs-check.log 2>&1"
in the "zfs-check" file. Is it possible to put multiple lines in the
same file? Any input greatly appreciated.
Cheers,
San
PS. Is there any better of doing that?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.