Switch to collected clients.conf
[mirror/dsa-puppet.git] / modules / bacula / manifests / client.pp
index ba0127f..ebc3e5c 100644 (file)
@@ -3,8 +3,7 @@
 # this mostly configures the file daemon, but also firewall rules and
 # fragments to sent to the other servers.
 class bacula::client(
-  Enum['present', 'absent'] $ensure = getfromhash($site::nodeinfo, 'not-bacula-client') ? { true => 'absent', default => 'present' },
-  # Enum['present', 'absent'] $ensure = defined(Class["bacula::not_a_client"]) ? { true => 'absent', default => 'present' },
+  Enum['present', 'absent'] $ensure = defined(Class["bacula::not_a_client"]) ? { true => 'absent', default => 'present' },
 ) inherits bacula {
   $package_ensure = $ensure ? { 'present' => 'installed', 'absent' => 'purged' }
   $service_ensure = $ensure ? { 'present' => 'running', 'absent'  => 'stopped' }
@@ -34,9 +33,12 @@ class bacula::client(
     }
   }
 
-  package { ['bacula-fd', 'bacula-common']:
+  ensure_packages ( [
+   'bacula-fd',
+   'bacula-common',
+  ], {
     ensure => $package_ensure
-  }
+  })
 
   service { 'bacula-fd':
     ensure    => $service_ensure,