Defined Type: incron::job
- Defined in:
- manifests/job.pp
Overview
Primary incron resource used to create incron jobs.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'manifests/job.pp', line 14
define incron::job (
String[1] $command,
Variant[Incron::Event,
Array[Incron::Event, 2]] $event,
Stdlib::Unixpath $path,
String[1] $user = 'root',
) {
include ::incron
if !defined(Concat["/var/spool/incron/${user}"]) {
concat { "/var/spool/incron/${user}":
ensure => present,
mode => '0600',
owner => $user,
group => 'incron',
}
}
concat::fragment { "incron_${title}":
target => "/var/spool/incron/${user}",
content => "${path} ${join(any2array($event), ',')} ${command}\n",
}
}
|