$reverse_ensure = $ensure ? { 'present' => 'absent', 'absent' => 'present' }
if $ensure == 'present' {
- @@bacula::storage::client { $::fqdn:
- tag => "bacula::to-storage::${storage_server}"
- }
-
@@bacula::director::client { $::fqdn:
port_fd => $port_fd,
- tag => "bacula::to-director::${director_server}"
+ tag => "bacula::to-director::${director_server}",
+ }
+
+ @@bacula::storage::client { $::fqdn:
+ tag => "bacula::to-storage::${storage_server}",
+ director_server => $director_server,
}
@@concat::fragment { "bacula-dsa-client-list::${::fqdn}":
}
# allow access from director
- Ferm::Rule::Simple <<| tag == "bacula::director-to-fd::${bacula::bacula_director_address}" |>> {
+ Ferm::Rule::Simple <<| tag == "bacula::director-to-fd::${director_server}" |>> {
port => $port_fd,
}
# get access to the storage
@@ferm::rule::simple { "bacula::fd-to-storage::${::fqdn}":
- tag => "bacula::fd-to-storage::${bacula::bacula_storage_address}",
+ tag => "bacula::fd-to-storage::${storage_server}",
description => 'Allow bacula-fd access to the bacula-storage',
chain => 'bacula-sd',
saddr => $bacula::public_addresses,