X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fbase_installation%2Fmanifests%2Fusers.pp;h=d0ac449a55a6a4c747212e9cd68f8637d80f0cec;hb=c93847dc9d2f9dea6ed09ce5f0cca479131de86d;hp=34df4bd08704beecd788df02741ec48f70314cb9;hpb=d13887c5bf74b1d2dc4a82bd1ab38aab561f84d5;p=perso%2FImmae%2FProjets%2FPuppet.git diff --git a/modules/base_installation/manifests/users.pp b/modules/base_installation/manifests/users.pp index 34df4bd..d0ac449 100644 --- a/modules/base_installation/manifests/users.pp +++ b/modules/base_installation/manifests/users.pp @@ -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 }