Puppet Class: zabbix::server::service

Inherits:
zabbix::server
Defined in:
manifests/server/service.pp

Overview

Parameters:

  • service_manage (Any) (defaults to: $zabbix::server::service_manage)
  • service_ensure (Any) (defaults to: $zabbix::server::service_ensure)
  • service_enable (Any) (defaults to: $zabbix::server::service_enable)


1
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
# File 'manifests/server/service.pp', line 1

class zabbix::server::service (

  $service_manage = $zabbix::server::service_manage,
  $service_ensure = $zabbix::server::service_ensure,
  $service_enable = $zabbix::server::service_enable,

) inherits zabbix::server {

  if $service_manage == true {
    service { 'zabbix-server':
      ensure     => $service_ensure,
      enable     => $service_enable,
      hasstatus  => true,
      hasrestart => true,
      require    => File['/etc/zabbix/zabbix_server.conf'],
      subscribe  => File['/etc/zabbix/zabbix_server.conf'],
    }
    service { 'httpd':
      ensure     => $service_ensure,
      enable     => $service_enable,
      hasstatus  => true,
      hasrestart => true,
      require    => Service['zabbix-server'],
      subscribe  => Service['zabbix-server'],
    }
  }

}