]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/base_installation/manifests/users.pp
Caldance
[perso/Immae/Projets/Puppet.git] / modules / base_installation / manifests / users.pp
index 34df4bd08704beecd788df02741ec48f70314cb9..d0ac449a55a6a4c747212e9cd68f8637d80f0cec 100644 (file)
@@ -22,6 +22,13 @@ class base_installation::users (
 
   $users.each |$user| {
     if ($user["username"] != "root") {
+      unless $user["shell"] == undef or empty($user["shell"]) {
+        ensure_packages([$user["shell"]])
+        $shell = "/bin/${user[shell]}"
+      } else {
+        $shell = undef
+      }
+
       user { "${user[username]}:${user[userid]}":
         name           => $user[username],
         uid            => $user[userid],
@@ -30,6 +37,7 @@ class base_installation::users (
         managehome     => true,
         system         => !!$user[system],
         home           => "/home/${user[username]}",
+        shell          => $shell,
         notify         => Exec["remove_password:${user[username]}:${user[userid]}"],
         purge_ssh_keys => true
       }