Add buildd to sbuild
[mirror/dsa-puppet.git] / 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"
+               }
+       }
 }