Make bacula DB a parameter and template variable again
[mirror/dsa-puppet.git] / modules / bacula / manifests / client.pp
index 5a8f41f..dfeb176 100644 (file)
@@ -26,8 +26,16 @@ class bacula::client(
     }
 
     # allow access from director
-    Ferm::Rule::Simple <<| tag == 'bacula::director-to-fd' |>> {
-      port => $bacula::bacula_client_port
+    Ferm::Rule::Simple <<| tag == "bacula::director-to-fd::${bacula::bacula_director_address}" |>> {
+      port => $bacula::bacula_client_port,
+    }
+
+    # get access to the storage
+    @@ferm::rule::simple { "bacula::fd-to-storage::${::fqdn}":
+      tag         => "bacula::director-to-storage::${bacula::bacula_storage_address}",
+      description => 'Allow bacula-fd access to the bacula-storage',
+      chain       => 'bacula-sd',
+      saddr       => $bacula::public_addresses,
     }
   } elsif $ensure == 'absent' {
     file { '/etc/bacula':