Puppet Class: confdroid_nagios::server::service

Inherits:
confdroid_nagios::params
Defined in:
manifests/server/service.pp

Summary

Class manages services for the confdroid_nagios module.

Overview

confdroid_nagios::server::service.pp Module name: confdroid_nagios Author: 12ww1160 (12ww1160@confdroid.com)



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

class confdroid_nagios::server::service (

) inherits confdroid_nagios::params {
  require confdroid_nagios::server::files
  if $ng_nagios_server == $fqdn {
    require confdroid_nagios::server::access_rules
    require confdroid_nagios::nagios::config
    require confdroid_nagios::server::nagios

    exec { 'ng_restart_httpd':
      command     => 'systemctl restart httpd',
      path        => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
      refreshonly => true,
    }

    service { $ng_service:
      ensure     => running,
      name       => $ng_service,
      enable     => true,
      hasrestart => true,
      hasstatus  => true,
      require    => Exec['ng_restart_httpd'],
    }
  }
}