X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fbacula%2Fmanifests%2Fclient.pp;h=8c33181b2f43d16cc7cec27268d1b2ec7d52fdc7;hb=891ab115f249a1c7e186cca9145989112353a5a0;hp=7900e9a2fc3175fc337e5134fcf5949250068b9e;hpb=2930ccd62026a0318e140ded45afdcc79c629407;p=mirror%2Fdsa-puppet.git diff --git a/modules/bacula/manifests/client.pp b/modules/bacula/manifests/client.pp index 7900e9a2f..8c33181b2 100644 --- a/modules/bacula/manifests/client.pp +++ b/modules/bacula/manifests/client.pp @@ -1,10 +1,18 @@ 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: bacula_client_port => $bacula::bacula_client_port, } + + @@concat::fragment { "bacula-dsa-client-list::$fqdn": + target => $bacula::bacula_dsa_client_list , + content => @("EOF"), + ${fqdn} + | EOF + tag => $bacula::tag_bacula_dsa_client_list, + } } package { ['bacula-fd']: @@ -50,16 +58,30 @@ class bacula::client inherits bacula { require => Package['bacula-fd'], 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': - domain => '(ip)', + @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}) ACCEPT", + rule => "proto tcp mod state state (NEW) dport (${bacula_client_port}) saddr (${bacula_director_ip_addrs}) ACCEPT", } - - #@ferm::rule { 'dsa-bacula-fd-v6': - # domain => '(ip6)', - # description => 'Allow bacula access from storage and director', - # rule => "proto tcp mod state state (NEW) dport (bacula-fd) saddr (${bacula_director_ip6}) ACCEPT", - #} }