BryanDavis has uploaded a new change for review.

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

Change subject: scap::l10nupdate: Fix ~l10nupdate provisioning in Labs
......................................................................

scap::l10nupdate: Fix ~l10nupdate provisioning in Labs

Explicitly provision the l10nupdate user's home directory. In Labs the
l10nupdate user exists in LDAP which will prevent the User resource from
provisoning the user's home directory via the managehome parameter. This
failure causes a failure later in the Puppet run when the
~l10nupdate/.gitconfig file is provisioned.

Change-Id: I8429c553072d896035556e7b17be62f10d1a5089
---
M modules/scap/manifests/l10nupdate.pp
1 file changed, 19 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/301405/1

diff --git a/modules/scap/manifests/l10nupdate.pp 
b/modules/scap/manifests/l10nupdate.pp
index a008043..8b563cb 100644
--- a/modules/scap/manifests/l10nupdate.pp
+++ b/modules/scap/manifests/l10nupdate.pp
@@ -33,7 +33,20 @@
         gid        => 10002,
         shell      => '/bin/bash',
         home       => '/home/l10nupdate',
-        managehome => true,
+    }
+
+    # Explicitly provision the l10nupdate user's home directory. In Labs the
+    # l10nupdate user exists in LDAP which will prevent the User resource from
+    # provisoning the user's home directory via the managehome parameter.
+    file { '/home/l10nupdate':
+        ensure => 'directory',
+        owner  => 'l10nupdate',
+        group  => 'l10nupdate',
+        mode   => '0755',
+        require => [
+            User['l10nupdate'],
+            Group['l10nupdate'],
+        ],
     }
 
     cron { 'l10nupdate':
@@ -73,11 +86,11 @@
 
     # T119746: make git fetch happy by setting up git identity
     file { '/home/l10nupdate/.gitconfig':
-        ensure => 'present',
-        owner  => 'l10nupdate',
-        group  => 'l10nupdate',
-        mode   => '0644',
-        source => 'puppet:///modules/scap/l10nupdate.gitconfig',
+        ensure  => 'present',
+        owner   => 'l10nupdate',
+        group   => 'l10nupdate',
+        mode    => '0644',
+        source  => 'puppet:///modules/scap/l10nupdate.gitconfig',
     }
 
     # Make sure the log directory exists and has adequate permissions.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8429c553072d896035556e7b17be62f10d1a5089
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <bda...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to