X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fbacula%2Fmanifests%2Fclient.pp;h=f8f83f202b59817ab757197d6fe697514ab61741;hb=3661675fcab6a1dab09910456c98f19aaa50b395;hp=a2f818ef32731b2d6c20a1b33abf57b201d57394;hpb=59983915d5be2a839af675365d23f78cdef96298;p=mirror%2Fdsa-puppet.git diff --git a/modules/bacula/manifests/client.pp b/modules/bacula/manifests/client.pp index a2f818ef3..f8f83f202 100644 --- a/modules/bacula/manifests/client.pp +++ b/modules/bacula/manifests/client.pp @@ -1,5 +1,5 @@ class bacula::client inherits bacula { - @@bacula::storage-per-node { $::fqdn: } + @@bacula::storage_per_node { $::fqdn: } if ! getfromhash($site::nodeinfo, 'not-bacula-client') { @@bacula::node { $::fqdn: @@ -50,18 +50,25 @@ class bacula::client inherits bacula { require => Package['bacula-fd'], notify => Service['bacula-fd'], } - file { '/etc/systemd/system/bacula-fd.service.d': - ensure => directory, - mode => '0755', - owner => root, - group => root, - } - file { '/etc/systemd/system/bacula-fd.service.d/user.conf': - source => 'puppet:///modules/bacula/bacula-fd-systemd', - mode => '0400', - owner => root, - group => root, - notify => Service['bacula-fd'], + if (versioncmp($::lsbmajdistrelease, '9') >= 0 and $systemd) { + # old name for the override content + file { '/etc/systemd/system/bacula-fd.service.d/user.conf': + ensure => absent, + } + systemd::override { 'bacula-fd': + content => @(EOT) + [Service] + ExecStart= + ExecStart=/usr/sbin/bacula-fd -c $CONFIG -f -u bacula -k + | EOT + } + } else { + file { '/etc/systemd/system/bacula-fd.service.d/user.conf': + ensure => absent, + } + systemd::override { 'bacula-fd': + ensure => absent, + } } @ferm::rule { 'dsa-bacula-fd-v4': @@ -75,4 +82,12 @@ class bacula::client inherits bacula { # description => 'Allow bacula access from storage and director', # rule => "proto tcp mod state state (NEW) dport (bacula-fd) saddr (${bacula_director_ip6}) ACCEPT", #} + + @@concat::fragment { "bacula-dsa-client-list::$fqdn": + target => $bacula::bacula_dsa_client_list , + content => @("EOF"), + ${fqdn} + | EOF + tag => $bacula::tag_bacula_dsa_client_list, + } }