1 define varnish::config (
6 $backend = "-s malloc,256m",
8 if $name != "default" {
9 fail ( "This module cannot setup non-default varnish instances yet." )
16 if ! ($source or $content) {
17 fail ( "No configuration found for ${name}" )
20 $listenarr = [] + $listen
21 $listenstr = join(prefix($listenarr, "-a "), " ")
22 systemd::override { 'varnish':
26 ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F ${listenstr} -T localhost:6082 -f /etc/varnish/${name}.vcl -S /etc/varnish/secret -s ${backend}
30 $dest = "/etc/varnish/${name}.vcl"
35 notify => Service["varnish"],
41 notify => Service["varnish"],
46 fail ( "Can only deal with ensure=>present for now" )