start varnish only after network is online
[mirror/dsa-puppet.git] / modules / varnish / manifests / config.pp
index e45edd8..0598e60 100644 (file)
@@ -12,6 +12,7 @@ define varnish::config (
        case $ensure {
                present: {
                        include varnish::base
+                       include stretch::network_online
 
                        if ! ($source or $content) {
                                fail ( "No configuration found for ${name}" )
@@ -21,6 +22,8 @@ define varnish::config (
                        $listenstr = join(prefix($listenarr, "-a "), " ")
                        systemd::override { 'varnish':
                                content  => @("EOF"),
+                                       [Unit]
+                                       After=network-online.target
                                        [Service]
                                        ExecStart=
                                        ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F ${listenstr} -T localhost:6082 -f /etc/varnish/${name}.vcl -S /etc/varnish/secret -s ${backend}