Forgive my ignorance, but puppet and ruby are both very new to me.
I am trying to use puppet for (amongst other things) manage a custom
backup script i use on all my machines. The script reads a
configuration file that tells it where to backup from and to. Every
machine is different, some only backup a single folder where others
backup many folders (an example config file is below). I figure the
best way to do this with puppet would be to create a template
configuration file for the backup script and add the custom
definitions in each node manifest.
If the node only has one folder to backup it''s fairly straight
forward, i just define my values for each and everything fills itself
out nicely. Where my problem lies is when there are multiple values
that need to be filled.
(looking at the example below) how would i tell puppet to add "JBoss"
to the conf file with it''s backupsouredir of "/opt/jboss"
with it''s
includes and excludes, then add "Apache" with it''s
backupsourcedir and
includes and excludes". Bear in mind this is just an example i had in
front of me at the time of this writing. Some servers may only have to
backup one directory and others have to backup dozens.
Any help would be appreciated
### Example backup.conf ###
Global {
hostname=example.mydomain.com
backupdestroot=/backup/path/example.mydomain.com #Parent
directory for backup files
logfile=/var/log/backupServer.log #Full path and
filename of server backup logs
rsyncopts=-avz --ignore-existing --stats --progress #Global
rsync options for all copies from this server
includes=#comma separated list of files/directories to
explicitly include for all applications
excludes=*log *log* *tmp* *work* #comma separated list of
files/directories to explicitly exclude for all applications
}
JBoss {
backupsourcedir=/opt/jboss
includes=a,b,c
excludes=x,y,z
}
Apache {
backupsourcedir=/etc/httpd
includes=a,b,c
excludes=x,y,z
}
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.