Dzahn has submitted this change and it was merged.
Change subject: turn ircecho into a parameterized class
......................................................................
turn ircecho into a parameterized class
in I6e5d832c9 I moved the variables for
it out of the node level, so they are not set
in site.pp anymore but instead in a role class.
this was to make it a role that beta can apply
on labs
but as Alex pointed out there it introduced
a regression for puppet3 compat. as suggested,
turn ircecho into a parameterized class instead
Change-Id: Ic3bd7c82635dfd1c4c85ee18827f089527a87975
---
M manifests/role/echoirc.pp
M modules/ircecho/manifests/init.pp
2 files changed, 19 insertions(+), 13 deletions(-)
Approvals:
jenkins-bot: Verified
Dzahn: Looks good to me, approved
diff --git a/manifests/role/echoirc.pp b/manifests/role/echoirc.pp
index a82e768..2f0da9c 100644
--- a/manifests/role/echoirc.pp
+++ b/manifests/role/echoirc.pp
@@ -19,7 +19,11 @@
}
}
- include ircecho
+ class { '::ircecho':
+ ircecho_logs => $ircecho_logs,
+ ircecho_nick => $ircecho_nick,
+ ircecho_server => $ircecho_server,
+ }
# bug 26784 - IRC bots process need nagios monitoring
nrpe::monitor_service { 'ircecho':
diff --git a/modules/ircecho/manifests/init.pp
b/modules/ircecho/manifests/init.pp
index f9464f5..8e7b032 100644
--- a/modules/ircecho/manifests/init.pp
+++ b/modules/ircecho/manifests/init.pp
@@ -1,16 +1,18 @@
# IRC echo class
-
-class ircecho {
-
- # To use this class, you must define some variables; here's an example
- # (leading hashes on channel names are added for you if missing):
- # $ircecho_logs = {
- # "/var/log/nagios/irc.log" =>
- # ["wikimedia-operations","#wikimedia-tech"],
- # "/var/log/nagios/irc2.log" => "#irc2",
- # }
- # $ircecho_nick = "nagios-wm"
- # $ircecho_server = "chat.freenode.net"
+# To use this class, you must define some parameters; here's an example
+# (leading hashes on channel names are added for you if missing):
+# $ircecho_logs = {
+# "/var/log/nagios/irc.log" =>
+# ["wikimedia-operations","#wikimedia-tech"],
+# "/var/log/nagios/irc2.log" => "#irc2",
+# }
+# $ircecho_nick = "icinga-wm"
+# $ircecho_server = "chat.freenode.net"
+class ircecho (
+ $ircecho_logs,
+ $ircecho_nick,
+ $ircecho_server = 'chat.freenode.net',
+) {
package { 'ircecho':
ensure => present,
--
To view, visit https://gerrit.wikimedia.org/r/129676
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3bd7c82635dfd1c4c85ee18827f089527a87975
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits