Puppet Class: varnish::ncsa

Defined in:
manifests/ncsa.pp

Summary

Allows setup of varnishncsa

Overview

Parameters:

  • enable (Boolean) (defaults to: true)

    enable service

  • service_ensure (Stdlib::Ensure::Service) (defaults to: 'running')

    ensure serice

  • varnishncsa_daemon_opts (String) (defaults to: '-a -w /var/log/varnish/varnishncsa.log -D -P /run/varnishncsa/varnishncsa.pid')

    Options handed to varnishncsa



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'manifests/ncsa.pp', line 9

class varnish::ncsa (
  Boolean $enable = true,
  Stdlib::Ensure::Service $service_ensure = 'running',
  String $varnishncsa_daemon_opts = '-a -w /var/log/varnish/varnishncsa.log -D -P /run/varnishncsa/varnishncsa.pid',
) {
  systemd::dropin_file { 'varnishncsa_service':
    unit     => 'varnishncsa.service',
    content  => epp('varnish/varnishncsa.dropin.epp', { 'daemon_opts' => $varnishncsa_daemon_opts }),
    filename => 'varnishncsa_override.conf',
  }
  ~> service { 'varnishncsa':
    ensure  => $service_ensure,
    enable  => $enable,
    require => Service['varnish'],
  }
}