system-config/modules/user/manifests/virtual.pp
Monty Taylor b47dbcdef0 Rework all of the slaves for virtualenv.
Includes:
  Fixing jenkins sudoers from jeblair
  Removing tarmac depend from jeblair
  Remove wheel group from jeblair

Change-Id: I86ec23f7aeafc31cc70b0f3a648739bb7316fc61
2011-10-13 11:53:33 -04:00

39 lines
941 B
Puppet

class user::virtual {
define localuser ($realname,$sshkeys='',$shell="/bin/bash") {
group { $title:
ensure => 'present'
}
user { $title:
ensure => "present",
comment => $realname,
home => "/home/$title",
shell => $shell,
gid => $title,
groups => ['sudo','admin'],
membership => 'minimum',
managehome => true, # creates the home directory (does not actually manage it)
require => Group[$title],
}
file { "${title}_sshdir":
name => "/home/$title/.ssh",
owner => $title,
group => $title,
mode => 700,
ensure => 'directory',
require => User[$title],
}
file { "${title}_keys":
name => "/home/$title/.ssh/authorized_keys",
owner => $title,
group => $title,
mode => 400,
content => $sshkeys,
ensure => 'present',
require => File["${title}_sshdir"],
}
}
}