Puppet Class: pcp::service

Defined in:
manifests/service.pp

Overview



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'manifests/service.pp', line 2

class pcp::service {
  if $pcp::enable_pmproxy {
    $_pmproxy_ensure = 'running'
    $_pmproxy_enable = true
  } else {
    $_pmproxy_ensure = 'stopped'
    $_pmproxy_enable = false
  }

  service { 'pmcd':
    ensure     => $pcp::_service_ensure,
    enable     => $pcp::_service_enable,
    hasstatus  => true,
    hasrestart => true,
  }
  -> service { 'pmlogger':
    ensure     => $pcp::_service_ensure,
    enable     => $pcp::_service_enable,
    hasstatus  => true,
    hasrestart => true,
  }
  -> service { 'pmie':
    ensure     => $pcp::_service_ensure,
    enable     => $pcp::_service_enable,
    hasstatus  => true,
    hasrestart => true,
  }

  # Disable
  #service { 'pcp':
  #  ensure     => 'running',
  #  enable     => true,
  #  hasstatus  => true,
  #  hasrestart => true,
  #}

  # Disable
  service { 'pmproxy':
    ensure     => $_pmproxy_ensure,
    enable     => $_pmproxy_enable,
    hasstatus  => true,
    hasrestart => true,
  }
}