X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fbase_installation%2Fmanifests%2Fusers.pp;h=1ce5da76e3c0997d24d7648ff4e6e7083daef52f;hb=220496056eb730f204f9d21d61d10d41d876c5a1;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..1ce5da7 100644 --- a/modules/base_installation/manifests/users.pp +++ b/modules/base_installation/manifests/users.pp @@ -15,13 +15,21 @@ class base_installation::users ( sudo::conf { 'wheel': priority => 10, - content => "%wheel ALL=(ALL) ALL" + content => "%wheel ALL=(ALL) ALL", + require => Package["sudo"], } contain "sudo" $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 +38,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 }