adjusted to boolean usage

This commit is contained in:
mh 2008-12-05 17:29:47 +00:00
parent 9e55abd8b9
commit d7edb606bc

View file

@ -25,14 +25,14 @@ define user::managed(
$uid = 'absent',
$gid = 'uid',
$groups = [],
$manage_group = 'true',
$manage_group = true,
$membership = 'minimum',
$homedir = 'absent',
$managehome = 'true',
$managehome = true,
$homedir_mode = '0750',
$sshkey = 'absent',
$password = 'absent',
$password_crypted = 'true',
$password_crypted = true,
$shell = 'absent'
){
@ -66,8 +66,7 @@ define user::managed(
}
case $managehome {
'true': {
if $managehome {
file{"$real_homedir":
ensure => directory,
require => User[$name],
@ -86,7 +85,6 @@ define user::managed(
}
}
}
}
case $uid {
'absent': { info("Not defining a uid for user $name") }
@ -124,8 +122,7 @@ define user::managed(
case $name {
root: {}
default: {
case $manage_group {
'true': {
if $manage_group {
group { $name:
allowdupe => false,
ensure => present,
@ -138,7 +135,6 @@ define user::managed(
}
}
}
}
case $sshkey {
'absent': { info("no sshkey to manage for user $name") }
@ -186,12 +182,12 @@ define user::managed(
# gid: by default it will take the same as the uid
define user::sftp_only(
$managehome = 'false',
$managehome = false,
$uid = 'absent',
$gid = 'uid',
$homedir_mode = '0750',
$password = 'absent',
$password_crypted = 'true'
$password_crypted = true,
) {
include user::groups::sftponly
user::managed{"${name}":