1 class bacula::director inherits bacula {
3 package { ['bacula-director-pgsql', 'bacula-common', 'bacula-common-pgsql']:
7 service { 'bacula-director':
11 require => Package['bacula-director-pgsql']
13 systemd::override { 'bacula-director':
20 exec { 'bacula-director reload':
21 path => '/usr/bin:/usr/sbin:/bin:/sbin',
22 command => 'service bacula-director reload',
26 file { '/etc/bacula/conf.d':
33 source => 'puppet:///files/empty/',
34 notify => Exec['bacula-director reload']
37 file { '/etc/bacula/bacula-dir.conf':
38 content => template('bacula/bacula-dir.conf.erb'),
41 require => Package['bacula-director-pgsql'],
42 notify => Exec['bacula-director reload']
45 @ferm::rule { 'dsa-bacula-dir':
47 description => 'Allow bacula access from localhost',
48 rule => "proto tcp mod state state (NEW) dport (bacula-dir) saddr (${bacula_director_ip} localhost) ACCEPT",
51 file { '/etc/bacula/conf.d/empty.conf':
55 require => Package['bacula-director-pgsql'],
56 notify => Exec['bacula-director reload']
61 package { 'bacula-console':
65 file { '/etc/bacula/bconsole.conf':
66 content => template('bacula/bconsole.conf.erb'),
69 require => Package['bacula-console']
72 package { 'python3-psycopg2': ensure => installed }
73 file { '/etc/bacula/scripts/volume-purge-action':
75 source => 'puppet:///modules/bacula/volume-purge-action',
78 file { '/etc/bacula/scripts/volumes-delete-old':
80 source => 'puppet:///modules/bacula/volumes-delete-old',
83 file { '/etc/bacula/storages-list.d':
90 source => 'puppet:///files/empty/',
92 file { "/etc/cron.d/puppet-bacula-stuff":
95 concat::fragment { 'dsa-puppet-stuff--bacula-director':
96 target => '/etc/cron.d/dsa-puppet-stuff',
98 @daily root chronic /etc/bacula/scripts/volume-purge-action -v
99 @daily root chronic /etc/bacula/scripts/volumes-delete-old -v