1 define varnish::config (
6 $backend = "-s malloc,256m",
8 if $name != "default" {
9 fail ( "This module cannot setup non-default varnish instances yet." )
15 include stretch::network_online
17 if ! ($source or $content) {
18 fail ( "No configuration found for ${name}" )
21 $listenarr = [] + $listen
22 $listenstr = join(prefix($listenarr, "-a "), " ")
23 dsa_systemd::override { 'varnish':
26 After=network-online.target
29 ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F ${listenstr} -T localhost:6082 -f /etc/varnish/${name}.vcl -S /etc/varnish/secret -s ${backend}
33 $dest = "/etc/varnish/${name}.vcl"
38 notify => Service["varnish"],
44 notify => Service["varnish"],
49 fail ( "Can only deal with ensure=>present for now" )