From: Peter Palfrader Date: Sun, 8 Sep 2019 10:48:59 +0000 (+0200) Subject: do bacula backups iff we do not include the bacula::not_a_client class X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=0d03fa1079842ae23ad85de4d3b806e2cf1d9f22;p=mirror%2Fdsa-puppet.git do bacula backups iff we do not include the bacula::not_a_client class --- diff --git a/modules/bacula/manifests/client.pp b/modules/bacula/manifests/client.pp index ba0127f86..f3443e37f 100644 --- a/modules/bacula/manifests/client.pp +++ b/modules/bacula/manifests/client.pp @@ -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' } diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index 6ab0e974d..87cf8e265 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -7,6 +7,10 @@ # include roles # class roles { + if getfromhash($site::nodeinfo, 'not-bacula-client') { + include bacula::not_a_client + } + if has_role('muninmaster') { include munin::master }