puppetlabs/puppetlabs-bacula — Issue #6: generating the /etc/bacula/bacula-dir.d/<node> files
Author: morsupil
Created: 2012-01-31 08:00:40+00:00
State: open

When I run a puppet apply I have the following error:

Could not parse for environment production: Syntax error at '='; expected '}' at /etc/puppet/manifests/nodes.pp:14 on node virt-morsup.deploy.private

I suppose that the syntax mention in the module readme isn't good so I replace:
$clients = {
'virt-morsup.deploy.private' = {
'fileset' => 'Basic:noHome',
'schedule' => 'Weekly',
}
}

BY

$clients = {
'virt-morsup.deploy.private' => {
'fileset' => 'Basic:noHome',
'schedule' => 'Weekly',
}
}

After that modification I get this error :

/usr/lib/ruby/1.8/puppet/parser/functions/create_resources.rb:9: warning: multiple values for a block parameter (2 for 1)
from /etc/puppet/modules/bacula/lib/puppet/parser/functions/generate_clients.rb:32

and the /etc/bacula/bacula-dir.d/ isn't generated.

Could you please explain me where i'm wrong?

here is the complete declaration of my node :

node "virt-morsup" inherits testnode {
$clients = {
'virt-morsup.deploy.private' => {
'fileset' => 'Basic:noHome',
'schedule' => 'Weekly',
}
}

class { 'bacula':
db_backend => mysql,
db_user => test,
db_password => toto,
db_host => localhost,
db_port => 3306,
db_database => bacula,
is_storage => true,
is_director => true,
is_client => true,
manage_console => true,
manage_db => true,
director_password => 'toto',
console_password => 'toto',
director_server => 'virt-morsup.deploy.private',
mail_to => 'root@localhost.localdomain',
storage_server => 'virt-morsup.deploy.private',
clients => $clients,
}
class { 'mysql::server': config_hash => { 'root_password' => 'toto' }
}