When I add a user to my puppet configuration, I end up copy/pasting something like this:
user {'jeff':
ensure => 'present',
groups => ['sudo', 'supervisor'],
require => [Group['sudo'], Group['supervisor']],
home => '/home/jeff',
managehome => true,
password => '...',
shell => '/bin/bash',
}
ssh_authorized_key { 'jeff@lorax':
ensure => 'present',
user => 'jeff',
require => User['jeff'],
type => 'rsa',
key => '...',
}
The only thing that changes from user to user is the user name, the ssh key (tag and value, and some users have several), and sometimes the group set.
I feel quite sure I've missed something about how to do this better, but I haven't found it yet. Any pointers?