I have a simple class like so for cronjobs:
class cron_jobs {
cron { cron1:
command => "/path/to/cron1",
user => root,
hour => 0,
minute => 5,
ensure => present,
}
cron { cron2:
command => "/path/to/cron2",
user => root,
hour => 0,
minute => 0,
ensure => present,
}
if $myvar == 'foo' {
cron { cron3.$myvar:
command => "/path/to/cron3",
user => root,
}
} else {
cron { cron3.$myvar:
commad => "/path/to/cron3",
user => root,
}
}
}
but I am obviously doing something wrong because the clients always
give a syntax error:
Could not retrieve catalog from remote server: Error 400 on SERVER:
Syntax error at '.'; expected '}' at /etc/puppet/modules/cron_jobs/
manifests/init.pp:17 on node noe.domain.com
Can anyone tell me what I am doing wrong? I've also tried with a case
statement instead of if but I get the same syntax error at the first
cron line. So Im guessing something is wrong with the cron command
in the bracked if statement ?
--
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.