Permalink
Browse files

Add a Puppet module to deploy Sinagios.

  • Loading branch information...
1 parent 7cf018b commit 675798403a0beee9302998ad5107c35c6c81cf9e @ohookins committed Nov 24, 2011
@@ -0,0 +1,37 @@
+class sinagios (
+ $cmd_file = '/var/spool/nagios/cmd/nagios.cmd',
+ $status_file = '/var/log/nagios/status.dat'
+) {
+ $rubygems = ['rubygem-rack', 'rubygem-thin', 'rubygem-sinatra', 'rubygem-json']
+
+ Package {
+ require => Package['ruby'],
+ ensure => installed,
+ }
+ package {
+ 'ruby':
+ require => undef;
+
+ $rubygems: ;
+
+ 'sinagios':
+ require => [Package['ruby'],Package[$rubygems]];
+ }
+
+ file { '/etc/sinagios/sinagios.conf':
+ ensure => present,
+ owner => 'root',
+ group => 'root',
+ mode => 0444,
+ content => template('sinagios/etc/sinagios/sinagios.conf.erb'),
+ require => Package['sinagios'],
+ notify => Service['sinagios'];
+ }
+
+ service { 'sinagios':
+ ensure => running,
+ enable => true,
+ hasstatus => true,
+ subscribe => Package['sinagios'];
+ }
+}
@@ -0,0 +1,3 @@
+---
+cmd_file: <%= cmd_file %>
+status_file: <%= status_file %>
@@ -0,0 +1 @@
+class { 'sinagios': }

0 comments on commit 6757984

Please sign in to comment.