Puppet Class: bacula::client
- Inherits:
- bacula
- Defined in:
- manifests/client.pp
Summary
Configure the Bacula File DaemonOverview
This class installs and configures the File Daemon to backup a client system.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'manifests/client.pp', line 30
class bacula::client (
Array[String] $packages,
String $services,
String $default_pool,
Optional[String] $default_pool_full,
Optional[String] $default_pool_inc,
Optional[String] $default_pool_diff,
Integer $port = 9102,
Optional[String] $listen_address = $facts['networking']['ip'],
String $password = 'secret',
Integer $max_concurrent_jobs = 2,
String $director_name = $bacula::director_name,
Bacula::Yesno $autoprune = true,
Bacula::Time $file_retention = '45 days',
Bacula::Time $job_retention = '6 months',
String $client = $trusted['certname'],
String $address = $facts['networking']['fqdn'],
Optional[Bacula::Yesno] $pki_signatures = undef,
Optional[Bacula::Yesno] $pki_encryption = undef,
Optional[String] $pki_keypair = undef,
Optional[String] $pki_master_key = undef,
Optional[String] $plugin_dir = undef,
) inherits bacula {
$group = $bacula::bacula_group
$conf_dir = $bacula::conf_dir
$config_file = "${conf_dir}/bacula-fd.conf"
package { $packages:
ensure => present,
}
service { $services:
ensure => running,
enable => true,
require => Package[$packages],
}
$use_pki = ($pki_signatures or $pki_encryption) and $pki_keypair
concat { $config_file:
owner => 'root',
group => $group,
mode => '0640',
show_diff => false,
require => Package[$packages],
notify => Service[$services],
}
concat::fragment { 'bacula-client-header':
target => $config_file,
content => epp('bacula/bacula-fd-header.epp'),
}
bacula::messages { 'Standard-fd':
daemon => 'fd',
director => "${director_name}-dir = all, !skipped, !restored",
append => '"/var/log/bacula/bacula-fd.log" = all, !skipped',
}
# Tell the director about this client config
@@bacula::director::client { $client:
address => $address,
port => $port,
password => $password,
autoprune => $autoprune,
file_retention => $file_retention,
job_retention => $job_retention,
tag => "bacula-${director_name}",
}
}
|