Defined Type: bacula::client::job

Defined in:
modules/bacula/manifests/client/job.pp

Overview

Definition: bacula::client::job

This definition exports an job definition to the director for backing up a fileset

Parameters:

$fileset
    The fileset to backup
$jodefaults
    The jobdefaults to inherit
$extras
    A Hash of configuration lines to add to the config file

Actions:

Will create a job definition using the given defaults for the director
to collect and then reload itself

Requires:

bacula::director

Sample Usage:

bacula::client::job { 'rootfs-ourdefaults':
    fileset     => 'root',
    jobdefaults => 'ourdefaults',
}

Parameters:

  • fileset (Any)
  • jobdefaults (Any)
  • extras (Any) (defaults to: undef)


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'modules/bacula/manifests/client/job.pp', line 27

define bacula::client::job(
    $fileset,
    $jobdefaults,
    $extras=undef) {

    $director = $::bacula::client::director

    # We export to the director
    if wmflib::have_puppetdb() {
        @@file { "/etc/bacula/jobs.d/${::fqdn}-${name}.conf":
            ensure  => present,
            owner   => 'root',
            group   => 'bacula',
            mode    => '0440',
            content => template('bacula/bacula-client-job.erb'),
            notify  => Service['bacula-director'],
            require => File['/etc/bacula/jobs.d'],
            tag     => "bacula-client-${director}",
        }
    }
}