Yuvipanda has uploaded a new change for review.
https://gerrit.wikimedia.org/r/172802
Change subject: shinken: Don't say 'icinga' in shinken notification emails
......................................................................
shinken: Don't say 'icinga' in shinken notification emails
Change-Id: I11e745dc3d37ce474c11a814f782f18acdee123a
---
M modules/nagios_common/manifests/notification_commands.pp
R modules/nagios_common/templates/notification_commands.cfg.erb
M modules/shinken/manifests/server.pp
3 files changed, 18 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/02/172802/1
diff --git a/modules/nagios_common/manifests/notification_commands.pp
b/modules/nagios_common/manifests/notification_commands.pp
index e39479b..dadff8b 100644
--- a/modules/nagios_common/manifests/notification_commands.pp
+++ b/modules/nagios_common/manifests/notification_commands.pp
@@ -17,16 +17,21 @@
# The group which should own the check config files.
# Defaults to 'icinga'
#
+# [*lover_name*]
+# Name of thing that gives the recipient love when notifying
+# them via email of bad things that have happened
+#
class nagios_common::notification_commands(
$ensure = present,
$config_dir = '/etc/icinga',
$owner = 'icinga',
$group = 'icinga',
+ $lover_name = 'Icinga',
) {
file { "$config_dir/notification_commands.cfg":
- ensure => $ensure,
- source => 'puppet:///modules/nagios_common/notification_commands.cfg',
- owner => $owner,
- group => $group,
+ ensure => $ensure,
+ content => template('nagios_common/notification_commands.cfg'),
+ owner => $owner,
+ group => $group,
}
}
diff --git a/modules/nagios_common/files/notification_commands.cfg
b/modules/nagios_common/templates/notification_commands.cfg.erb
similarity index 100%
rename from modules/nagios_common/files/notification_commands.cfg
rename to modules/nagios_common/templates/notification_commands.cfg.erb
diff --git a/modules/shinken/manifests/server.pp
b/modules/shinken/manifests/server.pp
index f45350b..2cd0022 100644
--- a/modules/shinken/manifests/server.pp
+++ b/modules/shinken/manifests/server.pp
@@ -76,7 +76,6 @@
class { [
'nagios_common::user_macros',
'nagios_common::timeperiods',
- 'nagios_common::notification_commands',
] :
config_dir => '/etc/shinken',
owner => 'shinken',
@@ -85,6 +84,15 @@
require => Package['shinken'],
}
+ class { 'nagios_common::notification_commands':
+ config_dir => '/etc/shinken',
+ owner => 'shinken',
+ group => 'shinken',
+ notify => Service['shinken'],
+ require => Package['shinken'],
+ lover_name => 'Shinken',
+ }
+
# Default localhost config, we do not need this
file { '/etc/shinken/hosts/localhost.cfg':
ensure => absent,
--
To view, visit https://gerrit.wikimedia.org/r/172802
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I11e745dc3d37ce474c11a814f782f18acdee123a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits