class crontabs {
tag("crontabs")
notify{"INSIDE CRONTABS CLASS: Needed Class: crontabs-${hostname}": }
include "defines/*.pp"
if ( defined( Class["crontabs-${hostname}"] ) ) {
notify{"HOSTSPECIFIC CRON CLASS FOUND": }
import "crontabs-$hostname"
} else {
notify{"HOSTSPECIFIC CRON CLASS NOT FOUND crontabs-${hostname}": }
}
}
Here the file included by 'include "defines/*.pp"':
define crontabs-holgitestsles111a {
cron { 'root-holgitestsles111a-1':
hour => ['0'],
ensure => 'present',
command => '/usr/local/bin/shack5.sh 7 root',
minute => ['5'],
target => 'root',
user => 'root'
}
}