er, I lost this in the merge
[mirror/dsa-puppet.git] / modules / bacula / manifests / director.pp
1 class bacula::director inherits bacula {
2
3         package { ['bacula-director-pgsql', 'bacula-common', 'bacula-common-pgsql']:
4                 ensure => installed
5         }
6
7         service { 'bacula-director':
8                 ensure    => running,
9                 enable    => true,
10                 hasstatus => true,
11                 require   => Package['bacula-director-pgsql']
12         }
13
14         file { '/etc/bacula/conf.d':
15                 ensure => directory,
16                 mode   => '0755',
17                 group  => bacula,
18                 purge  => true,
19                 notify => Service['bacula-director']
20         }
21
22         Bacula::Node<<| |>>
23
24         file { '/etc/bacula/bacula-dir.conf':
25                 content => template('bacula/bacula-dir.conf.erb'),
26                 mode    => '0440',
27                 group   => bacula,
28                 require => Package['bacula-director-pgsql'],
29                 notify  => Service['bacula-director']
30         }
31
32         @ferm::rule { 'dsa-bacula-dir':
33                 domain      => '(ip ip6)',
34                 description => 'Allow bacula access from localhost',
35                 rule        => "proto tcp mod state state (NEW) dport (bacula-dir) saddr (${bacula_director_address} localhost) ACCEPT",
36         }
37 }