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.
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 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'manifests/client.pp', line 53
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,
Array[String[1]] $listen_address = [],
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}",
}
}
|