aboutsummaryrefslogtreecommitdiff
path: root/modules/base_installation
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-06-05 21:14:55 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-06-05 22:47:47 +0200
commit851ca3c6f662e26e949e57669d7962abb6c22510 (patch)
tree6677e8dc17cecd9e56b9c25a3c2a322cb622c378 /modules/base_installation
parent435b97f50bdc1c8a5e48bedf3772fcb16abb3440 (diff)
downloadPuppet-851ca3c6f662e26e949e57669d7962abb6c22510.tar.gz
Puppet-851ca3c6f662e26e949e57669d7962abb6c22510.tar.zst
Puppet-851ca3c6f662e26e949e57669d7962abb6c22510.zip
Caldance
Diffstat (limited to 'modules/base_installation')
-rw-r--r--modules/base_installation/manifests/users.pp8
1 files changed, 8 insertions, 0 deletions
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 (
22 22
23 $users.each |$user| { 23 $users.each |$user| {
24 if ($user["username"] != "root") { 24 if ($user["username"] != "root") {
25 unless $user["shell"] == undef or empty($user["shell"]) {
26 ensure_packages([$user["shell"]])
27 $shell = "/bin/${user[shell]}"
28 } else {
29 $shell = undef
30 }
31
25 user { "${user[username]}:${user[userid]}": 32 user { "${user[username]}:${user[userid]}":
26 name => $user[username], 33 name => $user[username],
27 uid => $user[userid], 34 uid => $user[userid],
@@ -30,6 +37,7 @@ class base_installation::users (
30 managehome => true, 37 managehome => true,
31 system => !!$user[system], 38 system => !!$user[system],
32 home => "/home/${user[username]}", 39 home => "/home/${user[username]}",
40 shell => $shell,
33 notify => Exec["remove_password:${user[username]}:${user[userid]}"], 41 notify => Exec["remove_password:${user[username]}:${user[userid]}"],
34 purge_ssh_keys => true 42 purge_ssh_keys => true
35 } 43 }