Puppet Class: nagios::server::service

Defined in:
manifests/server/service.pp

Overview

Class: nagios::server::service

This is going to check that all files have the correct permissions (this is due to puppet not really working quite right). Will also ensure the nagios server instance is running.

Authors

Ben Field <ben.field@concreteplatform.com>



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'manifests/server/service.pp', line 10

class nagios::server::service {
  exec { 'rechmod':
    command     => '/bin/chown -R root:nagios /etc/nagios3/conf.d/puppet/ && /bin/chmod 640 /etc/nagios3/conf.d/puppet/*',
    refreshonly => true,
    notify      => Service['nagios3'],
  }

  service { 'nagios3':
    ensure  => running,
    enable  => true,
    require => Package['nagios3'],
    restart => '/usr/sbin/nagios3 -v /etc/nagios3/nagios.cfg && /etc/init.d/nagios3 reload'
  }

}