define varnish::config (
- $listen = ':6081',
+ $listen = [':6081'],
$source=undef,
$content=undef,
$ensure = 'present',
case $ensure {
present: {
include varnish::base
+ include stretch::network_online
if ! ($source or $content) {
fail ( "No configuration found for ${name}" )
}
- systemd::override { 'varnish':
+ $listenarr = [] + $listen
+ $listenstr = join(prefix($listenarr, "-a "), " ")
+ dsa_systemd::override { 'varnish':
content => @("EOF"),
+ [Unit]
+ After=network-online.target
[Service]
ExecStart=
- ExecStart=/usr/sbin/varnishd -a ${listen} -T localhost:6082 -f /etc/varnish/${name}.vcl -S /etc/varnish/secret -s ${backend}
+ ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F ${listenstr} -T localhost:6082 -f /etc/varnish/${name}.vcl -S /etc/varnish/secret -s ${backend}
| EOF
}