Puppet Class: gitolite::gl-setup
- Defined in:
- manifests/gl-setup.pp
Overview
Class: gitolite::gl-setup
This class executes gl-setup
Parameters:
user: name of gitolite admin user
userkeysource: gitolite admin user public key source
userkeycontent: gitolite admin user public key content
refreshonly:
Actions:
Runs gl-setup -q -q <public_ley_file>
Requires:
class gitolite
Sample Usage:
class {
"gitolite":
...
}
class {
"gl-setup":
user => 'admin',
homedir => '/home/admin',
userkeycontent = 'ssh-rsa X76287hjashd873629o...',
}
- Remember: No empty lines between comments and class definition
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'manifests/gl-setup.pp', line 34
class gitolite::gl-setup (
$user,
$homedir,
$userkeysource = undef,
$userkeycontent = undef,
$refreshonly = true
) {
Class["gitolite"] -> Class["gitolite::gl-setup"]
file {
"${gitolite::homedir}/${gl-setup::user}.pub":
ensure => "file",
owner => $gitolite::gl-setup::user,
group => $gitolite::gl-setup::user,
source => $gitolite::gl-setup::userkeysource,
content => $gitolite::gl-setup::userkeycontent,
mode => 640;
}
exec {
"gl-setup":
require => File["${gitolite::gl-setup::homedir}/${gitolite::gl-setup::user}.pub"],
subscribe => File["${gitolite::gl-setup::homedir}/${gitolite::gl-setup::user}.pub"],
command => "gl-setup -q -q ${gl-setup::user}.pub",
environment => [
"HOME=${gitolite::gl-setup::homedir}",
"USER=${gitolite::gl-setup::user}",
],
cwd => $gitolite::gl-setup::homedir,
user => $gitolite::gl-setup::user,
group => $gitolite::gl-setup::user,
logoutput => "on_failure",
path => ["${gitolite::gl-setup::homedir}/bin", "/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin"],
refreshonly => $gitolite::gl-setup::refreshonly;
}
}
|