Skip to content

Instantly share code, notes, and snippets.

View scottslowe's full-sized avatar

Scott S. Lowe scottslowe

View GitHub Profile
@scottslowe
scottslowe / sample-virtual-user
Created November 10, 2012 06:51
Sample user definition using virtual user resource
# Used to define/realize users on Puppet-managed systems
#
class accounts {
@accounts::virtual { 'johndoe':
uid => 1001,
realname => 'John Doe',
pass => '<password hash goes here>',
}
}
@scottslowe
scottslowe / virtual-users-defined-type
Created November 10, 2012 06:46
Final (simplified) defined type for creating virtual user acounts
# Defined type for creating virtual user accounts
#
define accounts::virtual ($uid,$realname,$pass) {
user { $title:
ensure => 'present',
uid => $uid,
gid => $title,
shell => '/bin/bash',
home => "/home/${title}",
@scottslowe
scottslowe / defined-virtual-users
Created November 10, 2012 01:44
Puppet defined type for creating virtual user resources
# Defined type for creating virtual user accounts
#
define accounts::virtual ($uid,$gid,$realname,$pass,$sshkey="") {
@user { $title:
ensure => 'present',
uid => $uid,
gid => $gid,
shell => '/bin/bash',
home => "/home/${title}",