summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLeap devs <sysdev@leap.se>2012-09-19 16:29:34 +0000
committerLeap devs <sysdev@leap.se>2012-09-19 16:29:34 +0000
commiteafb4c73ee82915bf83eac01bb26265c531a68e2 (patch)
treecc43c64a64eed30c601a1aaa04e0521beca43a75 /templates
parent66257f3c425fea5fcea2acb999854aae5e7cf9f1 (diff)
parent41fe95b36253826b8f801ee1669acdb28c70076c (diff)
Merge branch 'immerda'
Conflicts: manifests/apache.pp manifests/irc_bot.pp manifests/service/mysql.pp templates/irc_bot/nsa.cfg.erb Conflict resolutions: apache.pp: just cosmetics mysql.pp: The shared modules provides more variables to fine tune the mysql health check so we went for this version. The irc bot conflicts were a result of immerda's branch not being up-to-date with the shared branch. The shared branch had factored out the irc_bot.pp into a directory, and added a few additional variables. Immerda changed the variables from having the prefix $nagios_ to not having it and did not have that refactor. The variable renames were good ones for the 2.7 refactoring work, and future hiera integration, so we want those. So to resolve this, we took the shared version of the refactor, and then took the immerda version of the variable renames. This requires an UPGRADE NOTICE in the README as people may have been using the previous variable names.
Diffstat (limited to 'templates')
-rw-r--r--templates/irc_bot/CentOS/nagios-nsa.sh.erb4
-rw-r--r--templates/irc_bot/Debian/nagios-nsa.sh.erb4
-rw-r--r--templates/irc_bot/nsa.cfg.erb23
3 files changed, 16 insertions, 15 deletions
diff --git a/templates/irc_bot/CentOS/nagios-nsa.sh.erb b/templates/irc_bot/CentOS/nagios-nsa.sh.erb
index 1561afd..0f9f87b 100644
--- a/templates/irc_bot/CentOS/nagios-nsa.sh.erb
+++ b/templates/irc_bot/CentOS/nagios-nsa.sh.erb
@@ -19,8 +19,8 @@
exec="/usr/local/bin/riseup-nagios-server.pl"
prog="nsa"
-PIDFILE=<%= nagios_nsa_pidfile %>
-SOCKFILE=<%= nagios_nsa_socket %>
+PIDFILE=<%= scope.lookupvar('nagios::irc_bot::real_nsa_pidfile') %>
+SOCKFILE=<%= scope.lookupvar('nagios::irc_bot::real_nsa_socket') %>
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
diff --git a/templates/irc_bot/Debian/nagios-nsa.sh.erb b/templates/irc_bot/Debian/nagios-nsa.sh.erb
index c9d1966..43c0e79 100644
--- a/templates/irc_bot/Debian/nagios-nsa.sh.erb
+++ b/templates/irc_bot/Debian/nagios-nsa.sh.erb
@@ -9,8 +9,8 @@
# Short-Description: Nagios Simple IRC Agent
### END INIT INFO
-PIDFILE=<%= nagios_nsa_pidfile %>
-SOCKFILE=<%= nagios_nsa_socket %>
+PIDFILE=<%= scope.lookupvar('nagios::irc_bot::real_nsa_pidfile') %>
+SOCKFILE=<%= scope.lookupvar('nagios::irc_bot::real_nsa_socket') %>
. /lib/lsb/init-functions
diff --git a/templates/irc_bot/nsa.cfg.erb b/templates/irc_bot/nsa.cfg.erb
index da6b2f0..9109b55 100644
--- a/templates/irc_bot/nsa.cfg.erb
+++ b/templates/irc_bot/nsa.cfg.erb
@@ -1,14 +1,15 @@
-%Nsa = (
- 'socket' => '<%= nagios_nsa_socket %>',
- 'server' => '<%= nagios_nsa_server %>',
- 'port' => '<%= nagios_nsa_port %>',
- 'nickname' => '<%= nagios_nsa_nickname %>',
- 'password' => '<%= nagios_nsa_password %>',
+%%Nsa = (
+ 'socket' => '<%= scope.lookupvar('nagios::irc_bot::real_nsa_socket') %>',
+ 'server' => '<%= scope.lookupvar('nagios::irc_bot::nsa_server') %>',
+ 'port' => '<%= scope.lookupvar('nagios::irc_bot::nsa_port') %>',
+ 'nickname' => '<%= scope.lookupvar('nagios::irc_bot::nsa_nickname') %>',
+ 'password' => '<%= scope.lookupvar('nagios::irc_bot::nsa_password') %>',
# this needs libio-socket-ssl-perl
# doesn't actually works because Net::IRC is braindead and tries to use IO::Socket::SSL->read/write instead of the builtin print, see http://search.cpan.org/dist/IO-Socket-SSL/SSL.pm
- #'SSL' => 0,
- 'channel' => '<%= nagios_nsa_channel %>',
- 'pidfile' => '<%= nagios_nsa_pidfile %>', # set to undef to disable
- 'realname' => "<%= nagios_nsa_realname %>",
- 'usenotices' => "<%= nagios_nsa_usenotices %>",
+ #'SSL' => 0,
+ 'channel' => '<%= scope.lookupvar('nagios::irc_bot::nsa_channel') %>',
+ 'pidfile' => '<%= scope.lookupvar('nagios::irc_bot::real_nsa_pidfile') %>', # set to undef to disable
+ 'realname' => "<%= scope.lookupvar('nagios::irc_bot::nsa_realname') %>",
+ 'realname' => "<%= scope.lookupvar('nagios::irc_bot::nsa_realname') %>",
+ 'usenotices' => "<%= scope.lookupvar('nagios::irc_bot::nsa_usenotices') %>",
);