1 # Bacula fd config: director snippet
3 # Each/The director exports this class to be collected by each fd.
5 # @param director_name bacula name of the dir instance
6 # @param director_address address of this dir instance that other instances should connect to (dns name)
7 # @param messages_name name of the Messages Resource
8 define bacula::client::director(
10 Stdlib::Host $director_address,
11 String $messages_name,
13 include bacula::client
15 $dir_client_secret = hkdf('/etc/puppet/secret', "bacula::director<->fd::${director_address}<->${::fqdn}")
17 @@bacula::director::client { $bacula::client::client:
18 tag => "bacula::to-director::${director_address}",
19 port_fd => $bacula::client::port_fd,
20 client => $bacula::client::client,
21 client_name => $bacula::client::client_name,
22 client_secret => $dir_client_secret,
23 file_retention => $bacula::client::file_retention,
24 job_retention => $bacula::client::job_retention,
28 "/etc/bacula/fd-conf.d/Dir_${director_address}.conf":
29 content => template('bacula/client/fd-per-director.conf.erb'),
32 notify => Exec['bacula-fd restart-when-idle'],