system-config/modules/drizzle_user/manifests/init.pp
2011-07-14 13:13:12 -04:00

33 lines
676 B
Puppet

define drizzle_user ( $username, $fullname ) {
group { $username:
ensure => 'present'
}
user { $username:
ensure => 'present',
comment => $fullname,
home => $operatingsystem ? {
Darwin => '/Users/$username',
solaris => '/export/home/$username',
default => '/home/$username',
},
managehome => true,
}
file { 'sshdir':
name => $operatingsystem ? {
Darwin => '/Users/$username/.ssh',
solaris => '/export/home/$username/.ssh',
default => '/home/$username/.ssh',
},
owner => $username,
group => $username,
mode => 600,
ensure => 'directory',
require => User[$username],
}
}