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 = "Msg-${director_address}", # XXX remove default
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 port_fd => $bacula::client::port_fd,
19 client => $bacula::client::client,
20 client_name => $bacula::client::client_name,
21 client_secret => $dir_client_secret,
22 tag => "bacula::to-director::${director_address}",
26 "/etc/bacula/fd-conf.d/Dir_${director_address}.conf":
27 content => template('bacula/client/fd-per-director.conf.erb'),
30 notify => Exec['bacula-fd restart-when-idle'],