Rush has uploaded a new change for review.

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

Change subject: admin user sudoers permissions cleanup
......................................................................

admin user sudoers permissions cleanup

If an empty priv array is specified now we leave
it behind on cleanup.  This is disingenuous in
terms of user cleanup.

Change-Id: I860c0e2bc84e4ec6856aee8e41f8070f75c89bc0
---
M modules/admin/manifests/user.pp
1 file changed, 11 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/207836/1

diff --git a/modules/admin/manifests/user.pp b/modules/admin/manifests/user.pp
index 8703072..ed43c96 100644
--- a/modules/admin/manifests/user.pp
+++ b/modules/admin/manifests/user.pp
@@ -121,10 +121,16 @@
         }
     }
 
-    if !empty($privileges) {
-        sudo::user { $name:
-            ensure     => $ensure,
-            privileges => $privileges,
-        }
+    # If specified privilege is empty we manage
+    # separately from the user as a whole and cleanup
+    if empty($privileges) {
+        $privileges_ensure = 'absent'
+    } else {
+        $privileges_ensure = $ensure
+    }
+
+    sudo::user { $name:
+        ensure     => $privileges_ensure,
+        privileges => $privileges,
     }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I860c0e2bc84e4ec6856aee8e41f8070f75c89bc0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush <[email protected]>

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

Reply via email to