Defined Type: bacula::director::storage

Defined in:
manifests/director/storage.pp

Summary

Configure a Bacula Director Storage resource

Overview

This define creates a storage declaration for the director. This informs the director which storage servers are available to send client backups to.

This resource is intended to be used from bacula::storage as an exported resource, so that each storage server is available as a configuration on the director.

Parameters:

  • address (String) (defaults to: $name)

    Bacula director configuration for Storage option ‘SDAddress’

  • port (Integer) (defaults to: 9103)

    Bacula director configuration for Storage option ‘SDPort’

  • password (String) (defaults to: 'secret')

    Bacula director configuration for Storage option ‘Password’

  • device_name (String) (defaults to: "${facts['networking']['fqdn']}-device")

    Bacula director configuration for Storage option ‘Device’

  • media_type (String) (defaults to: 'File')

    Bacula director configuration for Storage option ‘Media Type’

  • maxconcurjobs (Integer) (defaults to: 1)

    Bacula director configuration for Storage option ‘Maximum Concurrent Jobs’

  • conf_dir (String) (defaults to: $bacula::conf_dir)

    Bacula configuration directory



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'manifests/director/storage.pp', line 18

define bacula::director::storage (
  String  $address       = $name,
  Integer $port          = 9103,
  String  $password      = 'secret',
  String  $device_name   = "${facts['networking']['fqdn']}-device",
  String  $media_type    = 'File',
  Integer $maxconcurjobs = 1,
  String  $conf_dir      = $bacula::conf_dir,
) {
  $epp_storage_variables = {
    name          => $name,
    address       => $address,
    port          => $port,
    password      => $password,
    device_name   => $device_name,
    media_type    => $media_type,
    maxconcurjobs => $maxconcurjobs,
  }

  concat::fragment { "bacula-director-storage-${name}":
    target  => "${conf_dir}/conf.d/storage.conf",
    content => epp('bacula/bacula-dir-storage.epp', $epp_storage_variables),
  }
}