projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
continue with moving director address to a more local thing
[mirror/dsa-puppet.git]
/
modules
/
bacula
/
manifests
/
storage
/
client.pp
diff --git
a/modules/bacula/manifests/storage/client.pp
b/modules/bacula/manifests/storage/client.pp
index
71d8731
..
e49ff2b
100644
(file)
--- a/
modules/bacula/manifests/storage/client.pp
+++ b/
modules/bacula/manifests/storage/client.pp
@@
-2,11
+2,11
@@
#
# This is stored config by a client and then collected on the storage
#
#
# 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,
define bacula::storage::client(
String $director_server,
- St
ring
$client = $name
+ St
dlib::Host
$client = $name
) {
include bacula::storage
) {
include bacula::storage
@@
-14,6
+14,10
@@
define bacula::storage::client(
$media_type_name = "${bacula::storage::filestor_name}-${client}"
$directory = "${bacula::storage::backup_path}/${client}"
$media_type_name = "${bacula::storage::filestor_name}-${client}"
$directory = "${bacula::storage::backup_path}/${client}"
+ # this is created in both bacula::storage::client and
+ # bacula::storage::director and needs to be the same
+ $dir_storage_secret = hkdf('/etc/puppet/secret', "bacula::director<->storage::${director_server}<->${::fqdn}")
+
file {
"/etc/bacula/storage-conf.d/${client}.conf":
content => template('bacula/storage/sd-per-client.conf.erb'),
file {
"/etc/bacula/storage-conf.d/${client}.conf":
content => template('bacula/storage/sd-per-client.conf.erb'),
@@
-30,11
+34,12
@@
define bacula::storage::client(
}
# enable the director to make (client, storage) specific configuration
}
# enable the director to make (client, storage) specific configuration
- @@bacula::director::client_from_storage { $
::fqdn
:
+ @@bacula::director::client_from_storage { $
client
:
tag => "bacula::to-director::${director_server}",
tag => "bacula::to-director::${director_server}",
- storage_address => $::fqdn,
+ client => $client,
+ storage_address => $bacula::storage::storage_address,
port_sd => $bacula::storage::port_sd,
port_sd => $bacula::storage::port_sd,
- storage_secret => $
bacula::storage::
storage_secret,
+ storage_secret => $
dir_
storage_secret,
storage_device_name => $device_name,
storage_media_type_name => $media_type_name,
}
storage_device_name => $device_name,
storage_media_type_name => $media_type_name,
}