From: Peter Palfrader Date: Mon, 28 May 2018 18:13:08 +0000 (+0200) Subject: start varnish only after network is online X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=commitdiff_plain;h=8deca5e2e4da7378eb7c9916ca96fcc46e203530 start varnish only after network is online --- diff --git a/modules/roles/manifests/snapshot_web.pp b/modules/roles/manifests/snapshot_web.pp index a20fb381f..6054b5227 100644 --- a/modules/roles/manifests/snapshot_web.pp +++ b/modules/roles/manifests/snapshot_web.pp @@ -1,7 +1,6 @@ class roles::snapshot_web { include apache2 include apache2::rewrite - include stretch::network_online ensure_packages ( [ "libapache2-mod-wsgi", diff --git a/modules/varnish/manifests/config.pp b/modules/varnish/manifests/config.pp index e45edd824..0598e605e 100644 --- a/modules/varnish/manifests/config.pp +++ b/modules/varnish/manifests/config.pp @@ -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}