Dzahn has submitted this change and it was merged. Change subject: icinga-wm/echoirc: add $::realm case for labs ......................................................................
icinga-wm/echoirc: add $::realm case for labs - add a $::realm case for labs/prod flexibility make things easier for beta - adjust system role to match class name and edit description Change-Id: Ibf7167acd167e3ce1c7fa6e6f0726d8b16865ab1 --- M manifests/role/echoirc.pp 1 file changed, 17 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/echoirc.pp b/manifests/role/echoirc.pp index 801e453..9c4ba2f 100644 --- a/manifests/role/echoirc.pp +++ b/manifests/role/echoirc.pp @@ -1,13 +1,25 @@ # role class for Icinga IRC bot class role::echoirc { - $ircecho_logs = { '/var/log/icinga/irc.log' => '#wikimedia-operations' } - $ircecho_nick = 'icinga-wm' - $ircecho_server = 'chat.freenode.net' + system::role { 'echoirc': description => 'server running icinga irc bot' } + + case $::realm { + 'production': { + $ircecho_logs = { '/var/log/icinga/irc.log' => '#wikimedia-operations' } + $ircecho_nick = 'icinga-wm' + $ircecho_server = 'chat.freenode.net' + } + 'labs': { + $ircecho_logs = { '/var/log/icinga/irc.log' => '#wikimedia-labs' } + $ircecho_nick = 'icinga-wm-labs' + $ircecho_server = 'chat.freenode.net' + } + 'default': { + fail('unknown realm, please use labs or production') + } + } include ircecho - - system::role { 'ircecho': description => 'ircecho server' } # bug 26784 - IRC bots process need nagios monitoring nrpe::monitor_service { 'ircecho': -- To view, visit https://gerrit.wikimedia.org/r/129664 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf7167acd167e3ce1c7fa6e6f0726d8b16865ab1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn <dz...@wikimedia.org> Gerrit-Reviewer: Dzahn <dz...@wikimedia.org> Gerrit-Reviewer: Hashar <has...@free.fr> Gerrit-Reviewer: Reedy <re...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits