Skip to content

Instantly share code, notes, and snippets.

@cosimo
Created January 13, 2014 15:12
Show Gist options
  • Save cosimo/8402026 to your computer and use it in GitHub Desktop.
Save cosimo/8402026 to your computer and use it in GitHub Desktop.
How we manage users, groups and ssh keys with puppet for now
class mycompany::admins::cosimo {
realize( Group['devops'] )
mycompany::admin { 'cosimo':
gid => 2002,
fullname => 'Cosimo',
group => 'devops',
}
mycompany::ssh_key { 'cosimo-new-desktop':
ensure => 'present',
key => 'AAA...',
comment => 'cosimo@...',
type => 'ssh-rsa',
user => 'cosimo',
}
mycompany::ssh_key { 'cosimo-old-desktop':
ensure => 'absent',
key => 'AAA...',
comment => 'cosimo@...',
type => 'ssh-rsa',
user => 'cosimo',
}
}
class mycompany::admins::devops {
mycompany::group { 'devops':
gid => 2002,
}
include mycompany::admins::cosimo
# include mycompany::admins::<name>
# ...
}
class your-manifest {
include mycompany::admins::devops
# ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment