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 The name of the client (relevant for device names, media type names, etc.)
7 define bacula::director::client (
8 Integer $port_fd = 9102,
9 String $client = $name,
13 $bacula_pool_name = $bacula::bacula_pool_name
14 $bacula_filestor_name = $bacula::bacula_filestor_name
15 $bacula_filestor_device = $bacula::bacula_filestor_device
16 $bacula_storage_address = $bacula::bacula_storage_address
17 $bacula_storage_port = $bacula::bacula_storage_port
18 $bacula_storage_secret = $bacula::bacula_storage_secret
20 $bacula_ca_path = $bacula::bacula_ca_path
21 $bacula_ssl_client_cert = $bacula::bacula_ssl_client_cert
22 $bacula_ssl_client_key = $bacula::bacula_ssl_client_key
24 $bacula_client_name = "${client}-fd"
25 $bacula_client_secret = hkdf('/etc/puppet/secret', "bacula-fd-${client}")
27 file { "/etc/bacula/conf.d/${client}.conf":
28 content => template('bacula/director/dir-per-client.erb'),
31 notify => Exec['bacula-director reload']
34 file { "/etc/bacula/storages-list.d/${client}.storage":
35 content => "${bacula::bacula_filestor_client}-${client}\n",
38 notify => Exec['bacula-director reload']