From f3878ee32e4159ff315d96b980a1aec9cb4da82a Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 16 Feb 2010 03:09:39 +0100 Subject: [PATCH] Try making monit on squeeze work --- modules/monit/manifests/init.pp | 4 ++-- modules/monit/{files/default => templates/default.erb} | 3 +++ modules/monit/{files/monitrc => templates/monitrc.erb} | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) rename modules/monit/{files/default => templates/default.erb} (83%) rename modules/monit/{files/monitrc => templates/monitrc.erb} (98%) diff --git a/modules/monit/manifests/init.pp b/modules/monit/manifests/init.pp index 5e1ebe084..b7e909d1c 100644 --- a/modules/monit/manifests/init.pp +++ b/modules/monit/manifests/init.pp @@ -11,7 +11,7 @@ class monit { ; "/etc/monit/monitrc": - source => "puppet:///monit/monitrc", + content => template("monit/monitrc.erb"), require => Package["monit"], notify => Exec["monit restart"], mode => 400 @@ -40,7 +40,7 @@ class monit { ; "/etc/default/monit": - source => "puppet:///monit/default", + content => template("monit/default.erb"), require => Package["monit"], notify => Exec["monit restart"] ; diff --git a/modules/monit/files/default b/modules/monit/templates/default.erb similarity index 83% rename from modules/monit/files/default rename to modules/monit/templates/default.erb index afacfee2d..d89d3265d 100644 --- a/modules/monit/files/default +++ b/modules/monit/templates/default.erb @@ -10,7 +10,10 @@ # You must set this variable to for monit to start startup=1 +<% if nodeinfo.has_key?('squeeze') and not nodeinfo['squeeze'].empty? %> +<% else %> # To change the intervals which monit should run uncomment # and change this variable. CHECK_INTERVALS=300 +<% end %> diff --git a/modules/monit/files/monitrc b/modules/monit/templates/monitrc.erb similarity index 98% rename from modules/monit/files/monitrc rename to modules/monit/templates/monitrc.erb index e18f5b849..dc46f1951 100644 --- a/modules/monit/files/monitrc +++ b/modules/monit/templates/monitrc.erb @@ -21,7 +21,10 @@ ## Start monit in the background (run as a daemon) and check services at ## 2-minute intervals. # -# set daemon 120 +<% if nodeinfo.has_key?('squeeze') and not nodeinfo['squeeze'].empty? %> +set daemon 300 +<% else %> +<% end %> # # ## Set syslog logging with the 'daemon' facility. If the FACILITY option is -- 2.20.1