sd and fd look up hostnames, so start them only after the network is online -a
[mirror/dsa-puppet.git] / modules / bacula / manifests / client.pp
index 3505300..3837699 100644 (file)
@@ -34,7 +34,9 @@ class bacula::client(
   }
 
   if $ensure == 'present' {
-    Bacula::Client::Director <<| tag == "bacula::to-fd::${director_server}" |>>
+    Bacula::Client::Director <<| tag == "bacula::to-fd::${director_server}" |>> {
+      before => Exec['bacula-fd restart-when-idle'],
+    }
 
     @@bacula::storage::client { $client:
       tag             => "bacula::to-storage::${storage_server}",
@@ -83,6 +85,13 @@ class bacula::client(
     enable    => $service_enable,
     hasstatus => true,
   }
+  dsa_systemd::override { 'bacula-fd':
+    ensure  => $ensure,
+    content => @(EOF),
+      [Unit]
+      After=network-online.target
+      | EOF
+  }
 
   exec { 'bacula-fd restart-when-idle':
     path        => '/usr/bin:/usr/sbin:/bin:/sbin',