]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/bacula/manifests/client.pp
make backups of pejacevic
[dsa-puppet.git] / modules / bacula / manifests / client.pp
index abd11b359bd975b9271b4667d380e3c6496e924d..c75a376767af6383f7dd9d41071bf49a8e898f2a 100644 (file)
@@ -1,7 +1,7 @@
 class bacula::client inherits bacula {
        @@bacula::storage-per-node { $::fqdn: }
 
-       if $::hostname in [beethoven, berlioz, biber, diabelli, dinis, draghi, geo3, kaufmann, lully, master, new-master, reger, schumann, soler, vento, vieuxtemps, wilder, wolkenstein] {
+       if $::hostname in [beethoven, berlioz, biber, diabelli, dinis, draghi, geo3, kaufmann, lully, master, picconi, pejacevic, reger, schumann, soler, vento, vieuxtemps, wilder, wolkenstein] {
                @@bacula::node { $::fqdn: }
        }
 
@@ -16,6 +16,14 @@ class bacula::client inherits bacula {
                require   => Package['bacula-fd']
        }
 
+       exec { 'bacula-fd restart-when-idle':
+               path        => '/usr/bin:/usr/sbin:/bin:/sbin',
+               command     => 'sh -c "setsid /usr/local/sbin/bacula-idle-restart fd &"',
+               refreshonly => true,
+               subscribe   => File['/etc/ssl/debian/certs/thishost.crt'],
+               require     => File['/usr/local/sbin/bacula-idle-restart'],
+       }
+
        file { '/etc/bacula/bacula-fd.conf':
                content => template('bacula/bacula-fd.conf.erb'),
                mode    => '0640',
@@ -36,11 +44,17 @@ class bacula::client inherits bacula {
                require => Package['bacula-fd'],
                notify  => Service['bacula-fd'],
        }
-       file { '/etc/apt/preferences.d/dsa-bacula-client':
-               content => template('bacula/apt.preferences.bacula-client.erb'),
-               mode    => '0444',
-               owner   => root,
-               group   => root,
+       if $::lsbmajdistrelease < 7 {
+               file { '/etc/apt/preferences.d/dsa-bacula-client':
+                       content => template('bacula/apt.preferences.bacula-client.erb'),
+                       mode    => '0444',
+                       owner   => root,
+                       group   => root,
+               }
+       } else {
+               file { '/etc/apt/preferences.d/dsa-bacula-client':
+                       ensure => absent
+               }
        }
 
        @ferm::rule { 'dsa-bacula-fd-v4':