Split the director config coming from each node in two parts: one that comes from...
[mirror/dsa-puppet.git] / modules / bacula / manifests / client.pp
index 8bf5daa..2b7c35f 100644 (file)
@@ -19,13 +19,14 @@ class bacula::client(
   $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}":
@@ -37,13 +38,13 @@ class bacula::client(
     }
 
     # 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,