Puppet Class: varnish::service

Defined in:
manifests/service.pp

Summary

Manages the Varnish service

Overview

Examples:

Make sure Varnish is running

include 'varnish::service'

Disable Varnish service

class { 'varnish::service':
  ensure => stopped,
}

Parameters:

  • ensure (Stdlib::Ensure::Service) (defaults to: $varnish::service_ensure)

    Ensure service status

  • enable (Boolean) (defaults to: $varnish::service_enable)

    If Service should be enabled

  • vcl_reload_script (Stdlib::Absolutepath) (defaults to: '/usr/share/varnish/reload-vcl')

    Path to reload script



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'manifests/service.pp', line 19

class varnish::service (
  Stdlib::Ensure::Service $ensure            = $varnish::service_ensure,
  Boolean $enable                            = $varnish::service_enable,
  Stdlib::Absolutepath    $vcl_reload_script = '/usr/share/varnish/reload-vcl'
) {
  # include install
  include varnish::install

  systemd::dropin_file { 'varnish_service':
    unit     => 'varnish.service',
    content  => epp('varnish/varnish.dropin.epp'),
    filename => 'varnish_override.conf',
  }
  ~> service { 'varnish':
    ensure  => $ensure,
    require => Package['varnish'],
    enable  => $enable,
  }
}