We want to backup the director itself too
[mirror/dsa-puppet.git] / modules / bacula / manifests / director.pp
index a33f596..b48eedc 100644 (file)
@@ -1,4 +1,5 @@
 class bacula::director inherits bacula {
+       bacula::node { $::fqdn: }
 
        package { ['bacula-director-pgsql', 'bacula-common', 'bacula-common-pgsql']:
                ensure => installed
@@ -12,15 +13,16 @@ class bacula::director inherits bacula {
        }
 
        file { '/etc/bacula/conf.d':
-               ensure => directory,
-               mode   => '0755',
-               group  => bacula,
-               purge  => true,
-               notify => Service['bacula-director']
+               ensure  => directory,
+               mode    => '0755',
+               group   => bacula,
+               purge   => true,
+               force   => true,
+               recurse => true,
+               source  => 'puppet:///files/empty/',
+               notify  => Service['bacula-director']
        }
 
-       Bacula::Node<<| |>>
-
        file { '/etc/bacula/bacula-dir.conf':
                content => template('bacula/bacula-dir.conf.erb'),
                mode    => '0440',
@@ -34,4 +36,25 @@ class bacula::director inherits bacula {
                description => 'Allow bacula access from localhost',
                rule        => "proto tcp mod state state (NEW) dport (bacula-dir) saddr (${bacula_director_address} localhost) ACCEPT",
        }
+
+       file { '/etc/bacula/conf.d/empty.conf':
+               content => '',
+               mode    => '0440',
+               group   => bacula,
+               require => Package['bacula-director-pgsql'],
+               notify  => Service['bacula-director']
+       }
+
+       Bacula::Node<<| |>>
+
+       package { 'bacula-console':
+               ensure => installed;
+       }
+
+       file { '/etc/bacula/bconsole.conf':
+               content => template('bacula/bconsole.conf.erb'),
+               mode    => '0640',
+               group   => bacula,
+               require => Package['bacula-console']
+       }
 }