Puppet Class: bacula::fd::config

Inherits:
bacula::fd
Defined in:
manifests/fd/config.pp

Overview

concat bacula-fd 00 - base config 10 - dirctors



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'manifests/fd/config.pp', line 5

class bacula::fd::config inherits bacula::fd {

  if($bacula::params::systemd)
  {
    systemd::service { 'bacula-fd':
      execstart       => inline_template('/usr/sbin/bacula-fd -c /etc/bacula/bacula-fd.conf<% if defined?(@debug_level) %> -d <%= @debug_level %><% end %>'),
      pid_file        => "/var/run/bacula/bacula-fd.${bacula::fd::port}.pid",
      type            => 'forking',
      timeoutstartsec => '1m',
    }
  }

  concat { '/etc/bacula/bacula-fd.conf':
    ensure => 'present',
    owner  => 'root',
    group  => 'root',
    mode   => '0640',
  }

  concat::fragment{ '/etc/bacula/bacula-fd.conf base conf':
    target  => '/etc/bacula/bacula-fd.conf',
    order   => '00',
    content => template("${module_name}/fd/baculafd.erb"),
  }

  if($bacula::fd::director_name!=undef)
  {
    bacula::fd::director { $bacula::fd::director_name:
      password    => $bacula::fd::director_password,
      description => 'default director',
    }
  }
}