Defined Type: bacula::messages

Defined in:
manifests/messages.pp

Summary

Define a Bacula Messages

Overview

Create a Messages resource on the $daemon (director, storage or file).

Parameters:

  • append (Optional[String[1]]) (defaults to: undef)

    Append the message to the filename given in the address field

  • catalog (Optional[String[1]]) (defaults to: undef)

    Send the message to the Catalog database

  • console (Optional[String[1]]) (defaults to: undef)

    Send the message to the Bacula console

  • daemon (Enum['dir', 'fd', 'sd']) (defaults to: 'dir')

    Daemon to add Messages resource to

  • director (Optional[String[1]]) (defaults to: undef)

    Send the message to the Director whose name is given in the address field

  • mailcmd (Optional[String[1]]) (defaults to: undef)

    Specify exactly how to send the mail

  • mail (Optional[String[1]]) (defaults to: undef)

    Send the message to the email addresses that are given as a comma separated list in the address field

  • mailonerrorcmd (Optional[String[1]]) (defaults to: undef)

    Specify exactly how to send error mail

  • mailonerror (Optional[String[1]]) (defaults to: undef)

    Send the error message to the email addresses that are given as a comma separated list in the address field

  • mailonsuccesscmd (Optional[String[1]]) (defaults to: undef)

    Specify exactly how to send success mail

  • mailonsuccess (Optional[String[1]]) (defaults to: undef)

    Send the success message to the email addresses that are given as a comma separated list in the address field

  • mname (String[1]) (defaults to: 'Standard')

    The name of the Messages resource. The name you specify here will be used to tie this Messages resource to a Job and/or to the daemon

  • operatorcmd (Optional[String[1]]) (defaults to: undef)

    This resource specification is similar to the MailCommand except that it is used for Operator messages

  • operator (Optional[String[1]]) (defaults to: undef)

    Send the message to the email addresses that are specified as a comma separated list in the address field

  • syslog (Optional[String[1]]) (defaults to: undef)

    Send the message to the system log (syslog) using the facility specified in the address field



21
22
23
24
25
26
27
28
29
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
# File 'manifests/messages.pp', line 21

define bacula::messages (
  Optional[String[1]]     $append           = undef,
  Optional[String[1]]     $catalog          = undef,
  Optional[String[1]]     $console          = undef,
  Enum['dir', 'fd', 'sd'] $daemon           = 'dir',
  Optional[String[1]]     $director         = undef,
  Optional[String[1]]     $mailcmd          = undef,
  Optional[String[1]]     $mail             = undef,
  Optional[String[1]]     $mailonerrorcmd   = undef,
  Optional[String[1]]     $mailonerror      = undef,
  Optional[String[1]]     $mailonsuccesscmd = undef,
  Optional[String[1]]     $mailonsuccess    = undef,
  String[1]               $mname            = 'Standard',
  Optional[String[1]]     $operatorcmd      = undef,
  Optional[String[1]]     $operator         = undef,
  Optional[String[1]]     $syslog           = undef,
) {
  include bacula
  include bacula::common

  $epp_messages_variables = {
    mname            => $mname,
    director         => $director,
    append           => $append,
    syslog           => $syslog,
    catalog          => $catalog,
    console          => $console,
    mailcmd          => $mailcmd,
    mail             => $mail,
    mailonerrorcmd   => $mailonerrorcmd,
    mailonerror      => $mailonerror,
    mailonsuccesscmd => $mailonsuccesscmd,
    mailonsuccess    => $mailonsuccess,
    operator         => $operator,
    operatorcmd      => $operatorcmd,
  }

  concat::fragment { "bacula-messages-${daemon}-${name}":
    target  => "${bacula::conf_dir}/bacula-${daemon}.conf",
    content => epp('bacula/messages.epp', $epp_messages_variables),
  }
}