Puppet Class: bacula::client
- Defined in:
- modules/bacula/manifests/client.pp
Overview
Class: bacula::client
This class installs bacula-fd, configures it and ensures that it is running
Parameters:
$director
The FQDN of the server being our director
$catalog
Which bacula catalog will be used for this client
$file_retention
How much time the catalog will hold data about files
$job_retention
How much time the catalog will hold data about jobs
$fd_port
If needed to change the port the fd listens on. Default 9102
Actions:
Install bacula-fd, configure, ensure running
The director password is autogenerated and exported
Exports configuration to bacula-director
Defines a virtual resource for a bpipe mysql plugin
Requires:
Sample Usage:
class { 'bacula::client':
director => 'dir.example.com',
}
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 |
# File 'modules/bacula/manifests/client.pp', line 30
class bacula::client(
$director,
$catalog,
$file_retention,
$job_retention,
$directorpassword,
$fdport='9102',
) {
package { 'bacula-fd':
ensure => installed,
}
service { 'bacula-fd':
ensure => running,
require => Package['bacula-fd'],
}
# TODO: consider using profile::pki::get_cert
puppet::expose_agent_certs { '/etc/bacula':
provide_private => true,
provide_keypair => true,
user => 'bacula',
group => 'bacula',
require => Package['bacula-fd'],
notify => Service['bacula-fd'],
}
file { '/etc/bacula/bacula-fd.conf':
ensure => present,
owner => 'root',
group => 'root',
mode => '0400',
notify => Service['bacula-fd'],
content => template('bacula/bacula-fd.conf.erb'),
require => [
Package['bacula-fd'],
],
}
if wmflib::have_puppetdb() {
# We export oufself to the director
@@file { "/etc/bacula/clients.d/${::fqdn}.conf":
ensure => present,
owner => 'root',
group => 'bacula',
mode => '0440',
content => template('bacula/bacula-client.erb'),
notify => Service['bacula-director'],
tag => "bacula-client-${director}",
}
}
}
|