Defined Type: incron::job
- Defined in:
- manifests/job.pp
Overview
Primary incron resource used to create incron jobs.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'manifests/job.pp', line 21
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["${incron::spool_dir}/${user}"]) {
concat { "${incron::spool_dir}/${user}":
ensure => present,
mode => '0600',
owner => $user,
}
}
concat::fragment { "incron_${title}":
target => "${incron::spool_dir}/${user}",
content => "${path} ${join(any2array($event), ',')} ${command}\n",
}
}
|