diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-03-31 11:33:05 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-03-31 11:33:05 -0300 |
commit | 61ea881d6b7ca9ea82eff718d87f1a0e920b8c0d (patch) | |
tree | c1e630a4efa5fc32d2f20d650c067704bf37f4a6 | |
parent | 9b3970ff5ca231aa5a1627b40d495b0cd4850310 (diff) | |
download | puppet-user-61ea881d6b7ca9ea82eff718d87f1a0e920b8c0d.tar.gz puppet-user-61ea881d6b7ca9ea82eff718d87f1a0e920b8c0d.tar.bz2 |
More coding style
-rw-r--r-- | manifests/manage.pp | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/manifests/manage.pp b/manifests/manage.pp index 6d24521..e0f2d01 100644 --- a/manifests/manage.pp +++ b/manifests/manage.pp @@ -43,40 +43,41 @@ define user::manage( } $real_shell = $shell ? { - 'absent' => $operatingsystem ? { - openbsd => "/usr/local/bin/bash", - default => "/bin/bash", - }, + 'absent' => $operatingsystem ? { + openbsd => "/usr/local/bin/bash", + default => "/bin/bash", + }, default => $shell, } if $managehome == true { - if $ensure == 'absent' { - file{"$real_homedir": - ensure => absent, - purge => true, - force => true, - recurse => true, - } - } else { - file{"$real_homedir": - ensure => directory, - require => User[$name], - owner => $name, mode => $homedir_mode; + if $ensure == 'absent' { + file{ "$real_homedir": + ensure => absent, + purge => true, + force => true, + recurse => true, + } + } else { + file{ "$real_homedir": + ensure => directory, + require => User[$name], + owner => $name, + mode => $homedir_mode; + } + case $gid { + 'absent','uid': { + File[$real_homedir]{ + group => $name, } - case $gid { - 'absent','uid': { - File[$real_homedir]{ - group => $name, - } - } - default: { - File[$real_homedir]{ - group => $gid, - } - } + } + default: { + File[$real_homedir]{ + group => $gid, } + } } + } } else { if $managehome != false { if !defined(File[$managehome]) { @@ -132,7 +133,7 @@ define user::manage( groups => $real_groups, membership => $membership, password => $password, - uid => $uid ? { false => undef, default => $uid }, + uid => $uid ? { false => undef, default => $uid }, gid => $real_gid ? { false => undef, default => $real_gid }, } |