projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
75ce99c
)
Revert "Since the conditional does not work for default values for params, fall back...
author
Peter Palfrader
<peter@palfrader.org>
Wed, 25 Sep 2019 17:01:00 +0000
(19:01 +0200)
committer
Peter Palfrader
<peter@palfrader.org>
Wed, 25 Sep 2019 17:01:00 +0000
(19:01 +0200)
This reverts commit
75ce99c03293e2df071bcbb7f56694d192652586
.
data/common.yaml
patch
|
blob
|
history
modules/bacula/manifests/director.pp
patch
|
blob
|
history
modules/bacula/manifests/init.pp
patch
|
blob
|
history
modules/bacula/templates/bacula-dir.conf.erb
patch
|
blob
|
history
diff --git
a/data/common.yaml
b/data/common.yaml
index
06f0d03
..
a4c5ac6
100644
(file)
--- a/
data/common.yaml
+++ b/
data/common.yaml
@@
-33,6
+33,7
@@
roles::dns_primary::allow_access:
# bacula
#
bacula::email_all: 'bacula-reports@admin.debian.org'
# bacula
#
bacula::email_all: 'bacula-reports@admin.debian.org'
+bacula::email_error: 'bacula-reports@admin.debian.org'
bacula::ssl_ca_path: '/etc/ssl/debian/certs/ca.crt'
bacula::ssl_client_cert: '/etc/ssl/debian/certs/thishost.crt'
bacula::ssl_client_key: '/etc/ssl/private/thishost.key'
bacula::ssl_ca_path: '/etc/ssl/debian/certs/ca.crt'
bacula::ssl_client_cert: '/etc/ssl/debian/certs/thishost.crt'
bacula::ssl_client_key: '/etc/ssl/private/thishost.key'
diff --git
a/modules/bacula/manifests/director.pp
b/modules/bacula/manifests/director.pp
index
696ed7b
..
dd5395d
100644
(file)
--- a/
modules/bacula/manifests/director.pp
+++ b/
modules/bacula/manifests/director.pp
@@
-31,10
+31,6
@@
class bacula::director(
$some_pool_name = "poolfull-${pool_name}-${director_address}"
$some_client_name = "${director_address}-fd"
$some_pool_name = "poolfull-${pool_name}-${director_address}"
$some_client_name = "${director_address}-fd"
- $real_email_error = $bacula::email_error ? { true => $bacula::email_error , default => 'root@localhost' }
- $real_email_operator = $bacula::email_operator ? { true => $bacula::email_operator, default => 'root@localhost' }
- $real_email_daemon = $bacula::email_daemon ? { true => $bacula::email_daemon , default => 'root@localhost' }
-
# let the SD know we exist
@@bacula::storage::director{ $::fqdn:
tag => 'bacula::to-storage',
# let the SD know we exist
@@bacula::storage::director{ $::fqdn:
tag => 'bacula::to-storage',
diff --git
a/modules/bacula/manifests/init.pp
b/modules/bacula/manifests/init.pp
index
5eb7e93
..
90e42af
100644
(file)
--- a/
modules/bacula/manifests/init.pp
+++ b/
modules/bacula/manifests/init.pp
@@
-6,9
+6,9
@@
# @param ssl_server_cert path to TLS server certificate
# @param ssl_server_key path to TLS server certificate key
# @param email_all email address for all reports
# @param ssl_server_cert path to TLS server certificate
# @param ssl_server_key path to TLS server certificate key
# @param email_all email address for all reports
-# @param email_error email address for errors
(defaults to root@localhost)
-# @param email_operator email address for the operator (to mount tapes etc
; defaults to root@localhost
)
-# @param email_daemon email address for messages from the daemon
(defaults to root@localhost)
+# @param email_error email address for errors
+# @param email_operator email address for the operator (to mount tapes etc)
+# @param email_daemon email address for messages from the daemon
# @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
# @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
@@
-20,9
+20,9
@@
class bacula (
String $ssl_server_key,
Optional[String] $email_all = undef,
String $ssl_server_key,
Optional[String] $email_all = undef,
-
Optional[String] $email_error = undef
,
-
Optional[String] $email_operator = undef
,
-
Optional[String] $email_daemon = undef
,
+
String $email_error = $email_all ? { true => $email_all, default => 'root@localhost' }
,
+
String $email_operator = $email_error
,
+
String $email_daemon = $email_error
,
Array[Stdlib::IP::Address] $public_addresses = $base::public_addresses,
Boolean $has_ipv4 = $bacula::public_addresses.any |$addr| { $addr =~ Stdlib::IP::Address::V4 },
Boolean $has_ipv6 = $bacula::public_addresses.any |$addr| { $addr =~ Stdlib::IP::Address::V6 },
Array[Stdlib::IP::Address] $public_addresses = $base::public_addresses,
Boolean $has_ipv4 = $bacula::public_addresses.any |$addr| { $addr =~ Stdlib::IP::Address::V4 },
Boolean $has_ipv6 = $bacula::public_addresses.any |$addr| { $addr =~ Stdlib::IP::Address::V6 },
diff --git
a/modules/bacula/templates/bacula-dir.conf.erb
b/modules/bacula/templates/bacula-dir.conf.erb
index
92cafa8
..
b2a2093
100644
(file)
--- a/
modules/bacula/templates/bacula-dir.conf.erb
+++ b/
modules/bacula/templates/bacula-dir.conf.erb
@@
-108,10
+108,10
@@
Messages {
<% if @email_all %>
mail = <%= @email_all %> = all
<% end %>
<% if @email_all %>
mail = <%= @email_all %> = all
<% end %>
-<% if @
real_
email_error != @email_all %>
- mail on error = <%= @
real_
email_error %> = all
+<% if @email_error != @email_all %>
+ mail on error = <%= @email_error %> = all
<% end %>
<% end %>
- operator = <%= @
real_
email_operator %> = mount
+ operator = <%= @email_operator %> = mount
console = all, !skipped, !saved
syslog = all
append = "/var/lib/bacula/log" = all
console = all, !skipped, !saved
syslog = all
append = "/var/lib/bacula/log" = all
@@
-122,7
+122,7
@@
Messages {
Messages {
Name = Daemon
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
Messages {
Name = Daemon
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
- mail = <%= @
real_
email_daemon %> = all
+ mail = <%= @email_daemon %> = all
console = all, !skipped, !saved
syslog = all
append = "/var/lib/bacula/log" = all
console = all, !skipped, !saved
syslog = all
append = "/var/lib/bacula/log" = all