Split the director config coming from each node in two parts: one that comes from...
[mirror/dsa-puppet.git] / modules / bacula / templates / bacula-sd.conf.erb
1 ##
2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 ##
5 #  For Bacula release 5.0.1 (24 February 2010) -- debian 5.0.4
6
7 Storage {
8   Name = <%= @bacula_storage_name %>
9   SDAddresses = {
10     # bacula, on Debian 9 (stretch), does not resolve a single name
11     # to both v4 and v6 addresses.  Se we can't just say
12     # ip = { addr = <hostname> }.  Boo.
13     <%- if scope.lookupvar('deprecated::nodeinfo')['misc']['has_v4_ldap'] -%>
14     ipv4 = {
15       # use the hostname rather than the IP address from LDAP,
16       # as /etc/hosts might have a better answer in case of natted hosts.
17       addr = <%= @bacula_storage_address %>
18       port = <%= @port_sd %>
19     }
20     <%- end -%>
21     <%- if scope.lookupvar('deprecated::nodeinfo')['misc']['has_v6_ldap'] -%>
22     ipv6 = {
23       addr = <%= @bacula_storage_address %>
24       port = <%= @port_sd %>
25     }
26     <%- end -%>
27   }
28   WorkingDirectory = "/var/lib/bacula"
29   Pid Directory = "/run/bacula"
30   Plugin Directory = "/usr/lib/bacula"
31   Maximum Concurrent Jobs = 21
32   Heartbeat Interval = 60
33
34   TLS Enable = yes
35   TLS Require = yes
36   TLS Verify Peer = yes
37   TLS CA Certificate File = "<%= @bacula_ca_path %>"
38   # This is a server certificate, used for incoming connections.
39   TLS Certificate = "<%= @bacula_ssl_server_cert %>"
40   TLS Key = "<%= @bacula_ssl_server_key %>"
41 }
42
43 # List Directors who are permitted to contact Storage daemon
44 #
45 Director {
46   Name = <%= @bacula_director_name %>
47   Password = "<%= @storage_secret %>"
48
49   TLS Enable = yes
50   TLS Require = yes
51   TLS Verify Peer = yes
52   TLS Allowed CN = "clientcerts/<%= @bacula_director_address %>"
53   TLS CA Certificate File = "<%= @bacula_ca_path %>"
54   # This is a server certificate, used for incoming director connections.
55   TLS Certificate = "<%= @bacula_ssl_server_cert %>"
56   TLS Key = "<%= @bacula_ssl_server_key %>"
57 }
58
59 # Send all messages to the Director,
60 # mount messages also are sent to the email address
61 #
62 Messages {
63   Name = Standard
64   director = <%= @bacula_director_name %> = all
65 }
66
67 @|"sh -c 'for f in /etc/bacula/storage-conf.d/*.conf ; do echo @${f} ; done'"