Alexandros Kosiaris has submitted this change and it was merged.

Change subject: tcpircbot: add a role
......................................................................


tcpircbot: add a role

Change-Id: I78379be791a5216e9af0a26474149e4e52127ca5
---
A manifests/role/tcpircbot.pp
M manifests/site.pp
2 files changed, 29 insertions(+), 13 deletions(-)

Approvals:
  Alexandros Kosiaris: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/tcpircbot.pp b/manifests/role/tcpircbot.pp
new file mode 100644
index 0000000..c782178
--- /dev/null
+++ b/manifests/role/tcpircbot.pp
@@ -0,0 +1,28 @@
+class role::tcpircbot {
+    include ::tcpircbot
+    include passwords::logmsgbot
+
+    system::role { 'tcpircbot':
+        description => 'tcpircbot server',
+    }
+
+    nrpe::monitor_service { 'tcpircbot':
+        description  => 'tcpircbot_service_running',
+        nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a 
tcpircbot',
+    }
+
+    tcpircbot::instance { 'logmsgbot':
+        channels => '#wikimedia-operations',
+        password => $passwords::logmsgbot::logmsgbot_password,
+        cidr     => [
+            '::ffff:10.64.21.123/128',    # vanadium
+            '::ffff:10.64.0.196/128',     # tin
+            '::ffff:208.80.152.165/128',  # fenari
+            '::ffff:127.0.0.1/128',       # loopback
+        ],
+    }
+
+    ferm::rule { 'tcpircbot_allowed':
+        rule => 'proto tcp dport 9200 { saddr 10.64.21.123 10.64.0.196 
208.80.152.165 127.0.0.1 ACCEPT; }',
+    }
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index 84599e1..078a1cb 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1844,19 +1844,7 @@
     include role::ishmael
     include role::echoirc
     include role::tendril
-    include tcpircbot
-    include passwords::logmsgbot
-
-    tcpircbot::instance { 'logmsgbot':
-        channels => '#wikimedia-operations',
-        password => $passwords::logmsgbot::logmsgbot_password,
-        cidr     => [
-            '::ffff:10.64.21.123/128',    # vanadium
-            '::ffff:10.64.0.196/128',     # tin
-            '::ffff:208.80.152.165/128',  # fenari
-            '::ffff:127.0.0.1/128',       # loopback
-        ],
-    }
+    include role::tcpircbot
 }
 
 node 'nescio.esams.wikimedia.org' {

-- 
To view, visit https://gerrit.wikimedia.org/r/129135
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I78379be791a5216e9af0a26474149e4e52127ca5
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Matanya <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to