1 # Bacula client config on the director
3 # This is stored config by a client, collected on the director
5 # @param port_fd port that this node's bacula-fd is listening on
6 # @param client name of the client (relevant for device names, media type names, etc.)
7 # @param client_name bacula client name
8 # @param client_secret shared secret between director and client
9 # @param file_retention how long to keep information about which files are in which volumes/jobs
10 # @param job_retention how long to keep job records
11 define bacula::director::client (
13 Stdlib::Host $client = $name,
15 String $client_secret,
16 String $file_retention = '30 days', # XXX remove defaults
17 String $job_retention = '100 days', # XXX remove defaults
19 include bacula::director
21 # we define this in both bacula::director::client_from_storage and
22 # bacula::director::client and it needs to match.
23 $pool_name = "${bacula::director::pool_name}-${client}"
25 if defined(File["/etc/bacula/conf.d/${client}_storage.conf"]) {
26 # this config is only valid if the pools defined in ${client}_storage exist.
27 file { "/etc/bacula/conf.d/${client}.conf":
28 content => template('bacula/director/dir-per-client.erb'),
31 notify => Exec['bacula-director reload']