]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/bacula/manifests/director.pp
Add another host to be backed up
[dsa-puppet.git] / modules / bacula / manifests / director.pp
index e4ec300a46da060d7fdbcf7169558569393b29a8..55133e6ec7ac8950c53e7fa198fe6f4e9f0264e6 100644 (file)
@@ -18,6 +18,7 @@ class bacula::director inherits bacula {
       ensure  => directory,
       mode => 755,
       group => bacula,
+      purge => true,
       notify  => Exec["bacula-director restart"]
       ;
     "/etc/bacula/bacula-dir.conf":
@@ -39,6 +40,7 @@ class bacula::director inherits bacula {
     # These must be kept in sync with the settings in bacula.pp
     $bacula_client_name       = "${name}-fd"
     $bacula_client_secret     = hmac("/etc/puppet/secret", "bacula-fd-${name}")
+    $client = $name
 
     file {
       "/etc/bacula/conf.d/${name}.conf":
@@ -49,7 +51,14 @@ class bacula::director inherits bacula {
       ;
     }
   }
-  $allhosts = keys($site::allnodeinfo)
-
+#  $allhosts = keys($site::allnodeinfo)
+  $allhosts = [ "berlioz.debian.org", "biber.debian.org" ]
   bacula_client { $allhosts: }
+
+  @ferm::rule { 'dsa-bacula-dir':
+    domain      => '(ip ip6)',
+    description => 'Allow bacula access from localhost',
+    rule        => "proto tcp mod state state (NEW) dport (bacula-dir) saddr ($bacula_director_address localhost) ACCEPT",
+  }
+
 }