Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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'
  }
}