some cleanup of bacula classes
[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         file { '/etc/bacula/bacula-dir.conf':
23                 content => template('bacula/bacula-dir.conf.erb'),
24                 mode    => '0440',
25                 group   => bacula,
26                 require => Package['bacula-director-pgsql'],
27                 notify  => Service['bacula-director']
28         }
29
30         @ferm::rule { 'dsa-bacula-dir':
31                 domain      => '(ip ip6)',
32                 description => 'Allow bacula access from localhost',
33                 rule        => "proto tcp mod state state (NEW) dport (bacula-dir) saddr (${bacula_director_address} localhost) ACCEPT",
34         }
35 }