I have a module for backuppc, and am trying to pass a hash to a define
to create a single script and the necessary directories. What I can't
seem to figure out how to do is have this hash's values be used to
create files / directories and also populate a template.
Here's the hash...
$backuppc_db_dumps = {
redmine => {
'backup_dir' => '/var/www/rails/redmine',
'databases' => 'redmine',
'dump_dir' => '/backups/misc-sqldumps',
},
general => {
'backup_dir' => '/etc',
'databases' => 'mysql',
'dump_dir' => '/backups/misc-sqldumps',
},
}
I have successfully used that to with a template to generate a script,
but am unsure how to pass those values to a define in order to ensure
the "dump_dir" exists.
After the above variable I added
backuppc::sqldump { $backuppc_db_dumps: }
Here's the define ...
define backuppc::sqldump () {
file {
"$name[dump_dir]":
ensure => directory,
owner => 'root',
group => 'root',
mode => '0770',
}
}
Is this something that's even possible? The error I get doesn't make
any sense to me...
err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Invalid tag "generaldump_dir/backups/misc-
sqldumpsdatabasesmysqlbackup_dir/etcredminedump_dir/backups/redmine-
sqldumpsdatabasesredminebackup_dir/var/www/rails/redmine" at /etc/
puppet/modules/backuppc/manifests/definitions/sqldump.pp:9 on node
Thanks
- Trey
--
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.