Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/186600

Change subject: scap: Move l10nupdate into module
......................................................................

scap: Move l10nupdate into module

Bug: T87221
Change-Id: Id8f5086d78fd8952aef3bcddce987614f80e2161
---
M manifests/misc/deployment.pp
M manifests/site.pp
R modules/scap/files/l10nupdate
R modules/scap/files/l10nupdate-1
R modules/scap/files/l10nupdate.logrotate
A modules/scap/manifests/l10nupdate.pp
6 files changed, 57 insertions(+), 60 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/186600/1

diff --git a/manifests/misc/deployment.pp b/manifests/misc/deployment.pp
index 2c90f77..eafc33f 100644
--- a/manifests/misc/deployment.pp
+++ b/manifests/misc/deployment.pp
@@ -73,65 +73,6 @@
     }
 }
 
-class misc::deployment::l10nupdate {
-    require scap::master
-
-    cron { 'l10nupdate':
-        ensure  => present,
-        command => '/usr/local/bin/l10nupdate-1 --verbose >> 
/var/log/l10nupdatelog/l10nupdate.log 2>&1',
-        user    => 'l10nupdate',
-        hour    => 2,
-        minute  => 0;
-    }
-
-    file {
-        '/usr/local/bin/l10nupdate':
-            owner  => 'root',
-            group  => 'root',
-            mode   => '0555',
-            source => 'puppet:///files/misc/l10nupdate/l10nupdate';
-        '/usr/local/bin/l10nupdate-1':
-            owner  => 'root',
-            group  => 'root',
-            mode   => '0555',
-            source => 'puppet:///files/misc/l10nupdate/l10nupdate-1';
-        '/usr/local/bin/sync-l10nupdate':
-            ensure => 'absent';
-        '/usr/local/bin/sync-l10nupdate-1':
-            ensure => 'absent';
-        # add ssh keypair for l10nupdate user from fenari for RT-5187
-        '/home/l10nupdate/.ssh/id_rsa':
-            owner  => 'l10nupdate',
-            group  => 'l10nupdate',
-            mode   => '0400',
-            source => 'puppet:///private/ssh/tin/l10nupdate/id_rsa';
-        '/home/l10nupdate/.ssh/id_rsa.pub':
-            owner  => 'l10nupdate',
-            group  => 'l10nupdate',
-            mode   => '0444',
-            source => 'puppet:///private/ssh/tin/l10nupdate/id_rsa.pub';
-    }
-
-    # Make sure the log directory exists and has adequate permissions.
-    # It's called l10nupdatelog because /var/log/l10nupdate was used
-    # previously so it'll be an existing file on some systems.
-    # Also create the dir for the SVN checkouts, and set up log rotation
-    file { '/var/log/l10nupdatelog':
-            ensure => directory,
-            owner  => 'l10nupdate',
-            group  => 'wikidev',
-            mode   => '0664';
-        '/var/lib/l10nupdate':
-            ensure => directory,
-            owner  => 'l10nupdate',
-            group  => 'wikidev',
-            mode   => '0755';
-        '/etc/logrotate.d/l10nupdate':
-            source => 'puppet:///files/logrotate/l10nupdate',
-            mode   => '0444';
-    }
-}
-
 class misc::deployment::scap_proxy {
     include rsync::server
     include network::constants
diff --git a/manifests/site.pp b/manifests/site.pp
index 568852f..4fc5010 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2397,7 +2397,6 @@
     include role::deployment::deployment_servers::production
     include mediawiki
     include role::scap::master
-    include misc::deployment::l10nupdate
     include mysql
     include role::labsdb::manager
     include ssh::hostkeys-collect
diff --git a/files/misc/l10nupdate/l10nupdate b/modules/scap/files/l10nupdate
similarity index 100%
rename from files/misc/l10nupdate/l10nupdate
rename to modules/scap/files/l10nupdate
diff --git a/files/misc/l10nupdate/l10nupdate-1 
b/modules/scap/files/l10nupdate-1
similarity index 100%
rename from files/misc/l10nupdate/l10nupdate-1
rename to modules/scap/files/l10nupdate-1
diff --git a/files/logrotate/l10nupdate 
b/modules/scap/files/l10nupdate.logrotate
similarity index 100%
rename from files/logrotate/l10nupdate
rename to modules/scap/files/l10nupdate.logrotate
diff --git a/modules/scap/manifests/l10nupdate.pp 
b/modules/scap/manifests/l10nupdate.pp
new file mode 100644
index 0000000..0147622
--- /dev/null
+++ b/modules/scap/manifests/l10nupdate.pp
@@ -0,0 +1,57 @@
+# = class: scap::l10nupdate
+#
+# Sets up files and cron required to do l10nupdate
+class scasp::l10nupdate {
+    require scap::master
+
+    cron { 'l10nupdate':
+        ensure  => present,
+        command => '/usr/local/bin/l10nupdate-1 --verbose >> 
/var/log/l10nupdatelog/l10nupdate.log 2>&1',
+        user    => 'l10nupdate',
+        hour    => 2,
+        minute  => 0;
+    }
+
+    file {
+        '/usr/local/bin/l10nupdate':
+            owner  => 'root',
+            group  => 'root',
+            mode   => '0555',
+            source => 'puppet:///modules/scap/l10nupdate';
+        '/usr/local/bin/l10nupdate-1':
+            owner  => 'root',
+            group  => 'root',
+            mode   => '0555',
+            source => 'puppet:///modules/scap/l10nupdate-1';
+        # add ssh keypair for l10nupdate user from fenari for RT-5187
+        '/home/l10nupdate/.ssh/id_rsa':
+            owner  => 'l10nupdate',
+            group  => 'l10nupdate',
+            mode   => '0400',
+            source => 'puppet:///private/ssh/tin/l10nupdate/id_rsa';
+        '/home/l10nupdate/.ssh/id_rsa.pub':
+            owner  => 'l10nupdate',
+            group  => 'l10nupdate',
+            mode   => '0444',
+            source => 'puppet:///private/ssh/tin/l10nupdate/id_rsa.pub';
+    }
+
+    # Make sure the log directory exists and has adequate permissions.
+    # It's called l10nupdatelog because /var/log/l10nupdate was used
+    # previously so it'll be an existing file on some systems.
+    # Also create the dir for the SVN checkouts, and set up log rotation
+    file { '/var/log/l10nupdatelog':
+            ensure => directory,
+            owner  => 'l10nupdate',
+            group  => 'wikidev',
+            mode   => '0664';
+        '/var/lib/l10nupdate':
+            ensure => directory,
+            owner  => 'l10nupdate',
+            group  => 'wikidev',
+            mode   => '0755';
+        '/etc/logrotate.d/l10nupdate':
+            source => 'puppet:///modules/scap/l10nupdate.logrotate',
+            mode   => '0444';
+    }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8f5086d78fd8952aef3bcddce987614f80e2161
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

Reply via email to