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 dsa_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 file { '/etc/bacula/conf.d/empty.conf':
49 require => Package['bacula-director-pgsql'],
50 notify => Exec['bacula-director reload']
55 package { 'bacula-console':
59 file { '/etc/bacula/bconsole.conf':
60 content => template('bacula/bconsole.conf.erb'),
63 require => Package['bacula-console']
66 package { 'python3-psycopg2': ensure => installed }
67 file { '/etc/bacula/scripts/volume-purge-action':
69 source => 'puppet:///modules/bacula/volume-purge-action',
72 file { '/etc/bacula/scripts/volumes-delete-old':
74 source => 'puppet:///modules/bacula/volumes-delete-old',
77 file { '/etc/bacula/storages-list.d':
84 source => 'puppet:///files/empty/',
86 file { '/usr/local/sbin/dsa-bacula-scheduler':
87 source => 'puppet:///modules/bacula/dsa-bacula-scheduler',
91 file { "/etc/cron.d/puppet-bacula-stuff": ensure => absent, }
92 concat::fragment { 'dsa-puppet-stuff--bacula-director':
93 target => '/etc/cron.d/dsa-puppet-stuff',
95 @daily root chronic /etc/bacula/scripts/volume-purge-action -v
96 @daily root chronic /etc/bacula/scripts/volumes-delete-old -v
97 */3 * * * * root sleep $(( $RANDOM \% 60 )); flock -w 0 -e /usr/local/sbin/dsa-bacula-scheduler /usr/local/sbin/dsa-bacula-scheduler
101 concat { $bacula::bacula_dsa_client_list:
103 concat::fragment { 'bacula-dsa-client-list::header' :
104 target => $bacula::bacula_dsa_client_list,
108 Concat::Fragment <<| tag == $bacula::tag_bacula_dsa_client_list |>>