Move operator_email to hiera
authorPeter Palfrader <peter@palfrader.org>
Wed, 25 Sep 2019 11:59:57 +0000 (13:59 +0200)
committerPeter Palfrader <peter@palfrader.org>
Wed, 25 Sep 2019 11:59:57 +0000 (13:59 +0200)
data/common.yaml
modules/bacula/manifests/init.pp
modules/bacula/templates/bacula-dir.conf.erb

index 51e1f13..d8b84a3 100644 (file)
@@ -32,6 +32,7 @@ roles::dns_primary::allow_access:
   - '2a01:3f0:0:28::25'
 # bacula
 #
+bacula::operator_email: 'bacula-reports@admin.debian.org'
 bacula::director::db_address: 'postgresql-manda-01.debian.org'
 bacula::director::db_port:    5432
 bacula::director::db_sslca:   '/etc/ssl/debian/certs/ca.crt'
index 36e970b..cff4087 100644 (file)
@@ -1,16 +1,17 @@
 # bacula class -- defines all the variables we care about in our bacula deployment
 #
+# @param operator_email   email address for reports
 # @param public_addresses this host's public IP addresses.  The ones it connects out from and is reachable from outsite.
 # @param has_ipv4         daemons should listen on ipv4
 # @param has_ipv6         daemons should listen on ipv6
 class bacula (
-  String  $bacula_operator_email      = 'bacula-reports@admin.debian.org',
+  String  $operator_email          = 'root@localhost',
 
-  String  $bacula_ca_path             = '/etc/ssl/debian/certs/ca.crt',
-  String  $bacula_ssl_client_cert     = '/etc/ssl/debian/certs/thishost.crt',
-  String  $bacula_ssl_client_key      = '/etc/ssl/private/thishost.key',
-  String  $bacula_ssl_server_cert     = '/etc/ssl/debian/certs/thishost-server.crt',
-  String  $bacula_ssl_server_key      = '/etc/ssl/private/thishost-server.key',
+  String  $bacula_ca_path          = '/etc/ssl/debian/certs/ca.crt',
+  String  $bacula_ssl_client_cert  = '/etc/ssl/debian/certs/thishost.crt',
+  String  $bacula_ssl_client_key   = '/etc/ssl/private/thishost.key',
+  String  $bacula_ssl_server_cert  = '/etc/ssl/debian/certs/thishost-server.crt',
+  String  $bacula_ssl_server_key   = '/etc/ssl/private/thishost-server.key',
 
   Array[Stdlib::IP::Address] $public_addresses = $base::public_addresses,
 
index 13912fd..b1cdedd 100644 (file)
@@ -106,9 +106,8 @@ Messages {
   Name = <%= @messages_name %>
   mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
   operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
-  #mail on error = <%= @bacula_operator_email %> = all, !skipped
-  mail = <%= @bacula_operator_email %> = all
-  operator = <%= @bacula_operator_email %> = mount
+  mail = <%= @operator_email %> = all
+  operator = <%= @operator_email %> = mount
   console = all, !skipped, !saved
   syslog = all
   append = "/var/lib/bacula/log" = all
@@ -119,7 +118,7 @@ Messages {
 Messages {
   Name = Daemon
   mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
-  mail = <%= @bacula_operator_email %> = all
+  mail = <%= @operator_email %> = all
   console = all, !skipped, !saved
   syslog = all
   append = "/var/lib/bacula/log" = all