# @param client_name bacula client name for this instance
# @param ensure present or absent
class bacula::client(
- String $director_server,
- String $storage_server,
+ Stdlib::Host $director_server,
+ Stdlib::Host $storage_server,
Integer $port_fd = 9102,
String $client_name = "${::fqdn}-fd",
Enum['present', 'absent'] $ensure = defined(Class['bacula::not_a_client']) ? { true => 'absent', default => 'present' },
String $pool_name = 'bacula',
Integer $port_dir = 9101,
Optional[String] $db_sslca = undef,
- #String $storage_name = "${::fqdn}-dir",
+ #String $director_name = "${::fqdn}-dir",
String $director_name = $bacula::bacula_director_name,
) inherits bacula {
# @param client_secret shared secret between director and client
define bacula::director::client (
Integer $port_fd,
- String $client = $name,
- String $client_name = "${client}-fd", # XXX remove default
- String $client_secret = hkdf('/etc/puppet/secret', "bacula-fd-${client}"), # XXX remove default
+ Stdlib::Host $client = $name,
+ String $client_name,
+ String $client_secret,
) {
include bacula::director
# @param storage_device_name Device name on the storage daemon for this node's backups
# @param storage_media_type_name Media type name on the storage daemon for this node's backupse
define bacula::director::client_from_storage (
- String $storage_address,
+ Stdlib::Host $storage_address,
Integer $port_sd,
String $storage_secret,
String $storage_device_name,
String $storage_media_type_name,
- String $client = $name,
+ Stdlib::Host $client = $name,
) {
include bacula::director
String $bacula_operator_email = 'bacula-reports@admin.debian.org',
String $bacula_director_name = 'debian-dir',
- String $bacula_director_address = 'dinis.debian.org',
- String $bacula_storage_address = 'storace.debian.org',
+ Stdlib::Host $bacula_director_address = 'dinis.debian.org',
+ Stdlib::Host $bacula_storage_address = 'storace.debian.org',
String $bacula_db_secret = hkdf('/etc/puppet/secret', "bacula-db-${::hostname}"),
# @param filestor_name storage device media type name prefix
# @param port_sd port for the sd to listen on
# @param storage_name bacula name of this sd instance
+# @param storage_address address of this sd instance that other instances should connect to (dns name)
class bacula::storage (
String $backup_path = '/srv/bacula',
String $filestor_device = 'FileStorage',
String $filestor_name = 'File',
Integer $port_sd = 9103,
String $storage_name = "${::fqdn}-sd",
+ Stdlib::Host $storage_address = $::fqdn,
) inherits bacula {
$storage_secret = hkdf('/etc/puppet/secret', "bacula-sd-${::fqdn}")
#
# This is stored config by a client and then collected on the storage
#
-# @param director_server The director for this client
-# @param client The name of the client (relevant for device names, media type names, etc.)
+# @param director_server director for this client
+# @param client name/address of the client (relevant for device names, media type names, etc.)
define bacula::storage::client(
String $director_server,
- String $client = $name
+ Stdlib::Host $client = $name
) {
include bacula::storage
@@bacula::director::client_from_storage { $client:
tag => "bacula::to-director::${director_server}",
client => $client,
- storage_address => $::fqdn,
+ storage_address => $bacula::storage::storage_address,
port_sd => $bacula::storage::port_sd,
storage_secret => $bacula::storage::storage_secret,
storage_device_name => $device_name,
ipv4 = {
# use the hostname rather than the IP address from LDAP,
# as /etc/hosts might have a better answer in case of natted hosts.
- addr = <%= @bacula_storage_address %>
+ addr = <%= @storage_address %>
port = <%= @port_sd %>
}
<%- end -%>
<%- if scope.lookupvar('deprecated::nodeinfo')['misc']['has_v6_ldap'] -%>
ipv6 = {
- addr = <%= @bacula_storage_address %>
+ addr = <%= @storage_address %>
port = <%= @port_sd %>
}
<%- end -%>