Add buildd to sbuild
authorPeter Palfrader <peter@palfrader.org>
Sat, 14 Feb 2015 21:43:37 +0000 (22:43 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sat, 14 Feb 2015 21:43:37 +0000 (22:43 +0100)
modules/buildd/manifests/init.pp

index 0c109e0..0390300 100644 (file)
@@ -173,4 +173,11 @@ class buildd ($ensure=present) {
                }
        }
 
+
+       if $::buildd_user_exists {
+               exec { 'add-buildd-user-to-sbuild':
+                       command => 'adduser buildd sbuild',
+                       onlyif  => "getent group sbuild > /dev/null && ! getent group sbuild | grep '\\<buildd\\>' > /dev/null"
+               }
+       }
 }