I'm trying to use a puppet manifest to set up a series of backup jobs on
servers which are each running a variety of mysql databases. My manifest
currently looks something like this, which almost works:
class backups () {
Cron {
ensure => present,
user => root,
}
$remote_dest = ['zx2:/data/src/backups','zx3:/data/backups']
if $hostname == "www" {
$databases = ['phpbb3','wikidb','rt4','wordpress']
$bkp_dest = "/data/backup"
elsif...
:
}
cron { $databses:
command => "mysqldump --user admin $databases | gzip >
mysql-$databases-`date +%Y%m%d`.gz",
hour => 1,
minute => 20,
}
cron { $remote_dest:
command => "rsync -arzv $bkp_dest $remote_dest",
hour => 4,
minute => 40,
}
}
I get the right number of cron jobs built, but when the array variables are
quoted, I get the contents all concatenated together. What I'd like is to
simulate a "for x in array" kind of construct. Is that possible using
puppet? I'd rather not have to build this and specify each job by hand,
which seems really clunky given the elegance of the tool. I'm sure I'm just
not seeing something.
Thanks!
Bret
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.