Puppet Class: unicorn_systemd::service

Defined in:
manifests/service.pp

Overview

Parameters:

  • service_ensure (Any) (defaults to: running)
  • service_enable (Any) (defaults to: true)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'manifests/service.pp', line 1

class unicorn_systemd::service (
  $service_ensure = running,
  $service_enable = true,
) {

  validate_re($service_ensure, '^(true|running|false|stopped)$', 'This parameter should be true(running) or false(stopped).')
  validate_bool($service_enable)

  service {
    'unicorn.socket':
      ensure => $service_ensure,
      enable => $service_enable,
      before => Service['unicorn@1.service'];

    [
      'unicorn@1.service',
      'unicorn@2.service',
    ]:
      ensure => $service_ensure,
      enable => $service_enable;
  }

}