From 8610e08a607c6249308c4d80d52df6f6c88a5a51 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 25 Sep 2019 13:59:57 +0200 Subject: [PATCH] Move operator_email to hiera --- data/common.yaml | 1 + modules/bacula/manifests/init.pp | 13 +++++++------ modules/bacula/templates/bacula-dir.conf.erb | 7 +++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/data/common.yaml b/data/common.yaml index 51e1f130a..d8b84a3cf 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -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' diff --git a/modules/bacula/manifests/init.pp b/modules/bacula/manifests/init.pp index 36e970b2a..cff4087b7 100644 --- a/modules/bacula/manifests/init.pp +++ b/modules/bacula/manifests/init.pp @@ -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, diff --git a/modules/bacula/templates/bacula-dir.conf.erb b/modules/bacula/templates/bacula-dir.conf.erb index 13912fd0b..b1cdeddac 100644 --- a/modules/bacula/templates/bacula-dir.conf.erb +++ b/modules/bacula/templates/bacula-dir.conf.erb @@ -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 -- 2.20.1