Dzahn has submitted this change and it was merged.

Change subject: add a maintenance cronjob to mail the mchenry alias file to OIT 
(RT #5278)
......................................................................


add a maintenance cronjob to mail the mchenry alias file to OIT (RT #5278)

Change-Id: I5842d5cc711ae08c132a8552c377b56b3fb063bf
---
M manifests/misc/maintenance.pp
M manifests/site.pp
2 files changed, 24 insertions(+), 0 deletions(-)

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



diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 5215da7..833ba16 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -374,3 +374,24 @@
 
        cronjob{ ["enwiki", "dewiki", "frwiki"]: cronenabled => $enabled }
 }
+
+class misc::maintenance::mail_exim_aliases( $enabled = false ) {
+
+       $alias_file = '/etc/exim4/aliases/wikimedia.org'
+       $recipient  = '[email protected]'
+       $subject    = "${hostname} mail aliases"
+
+       cron { 'mail_exim_aliases':
+               user => root,
+               minute => 0,
+               hour => 0,
+               weekday => 0,
+               command => "/usr/bin/mail -s '${subject}' ${recipient} < 
${alias_file} >/dev/null 2>&1",
+               ensure => $enabled ?{
+                       true => present,
+                       false => absent,
+                       default => absent
+               };
+       }
+
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index 1130c5a..a7b78e3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1788,6 +1788,9 @@
        }
 
        dns::recursor::monitor { "208.80.152.132": }
+
+       # mails the wikimedia.org mail alias file to OIT once per week
+       class { misc::maintenance::mail_exim_aliases: enabled => true }
 }
 
 node /mobile100[1-4]\.wikimedia\.org/ {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5842d5cc711ae08c132a8552c377b56b3fb063bf
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Lcarr <[email protected]>
Gerrit-Reviewer: RobH <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to