Update (c) year
[mirror/dsa-puppet.git] / modules / bacula / manifests / client.pp
index 7900e9a..f8f83f2 100644 (file)
@@ -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,6 +50,26 @@ 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)',
@@ -62,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,
+       }
 }