- ferm::rule { 'dsa-bacula-fd':
- domain => '(ip ip6)',
- description => 'Allow bacula access from storage and director',
- rule => "proto tcp mod state state (NEW) dport (${bacula_client_port}) saddr (${bacula_director_ip_addrs}) ACCEPT",
- }
+ file { '/etc/bacula/bacula-fd.conf':
+ ensure => $ensure,
+ content => template('bacula/bacula-fd.conf.erb'),
+ mode => '0640',
+ owner => root,
+ group => bacula,
+ require => Package['bacula-fd'],
+ notify => Exec['bacula-fd restart-when-idle'],
+ }
+ file { '/usr/local/sbin/bacula-backup-dirs':
+ ensure => $ensure,
+ mode => '0775',
+ source => 'puppet:///modules/bacula/bacula-backup-dirs',
+ }
+ file { '/usr/local/sbin/postbaculajob':
+ ensure => $ensure,
+ mode => '0775',
+ source => 'puppet:///modules/bacula/postbaculajob',
+ }
+ file { '/etc/default/bacula-fd':
+ ensure => $ensure,
+ content => template('bacula/default.bacula-fd.erb'),
+ mode => '0400',
+ owner => root,
+ group => root,
+ require => Package['bacula-fd'],
+ notify => Service['bacula-fd'],
+ }
+ if (versioncmp($::lsbmajdistrelease, '9') >= 0 and $systemd) {
+ dsa_systemd::override { 'bacula-fd':
+ content => @(EOT)
+ [Service]
+ ExecStart=
+ ExecStart=/usr/sbin/bacula-fd -c $CONFIG -f -u bacula -k
+ | EOT
+ }
+ } else {
+ dsa_systemd::override { 'bacula-fd':
+ ensure => absent,
+ }
+ }
+
+ ferm::rule { 'dsa-bacula-fd':
+ domain => '(ip ip6)',
+ description => 'Allow bacula access from storage and director',
+ rule => "proto tcp mod state state (NEW) dport (${bacula_client_port}) saddr (${bacula_director_ip_addrs}) ACCEPT",
+ }