Created
September 20, 2012 20:12
-
-
Save ojacobson/3758066 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class gitolite { | |
group { 'git': | |
ensure => present, | |
system => true, | |
} | |
user { 'git': | |
ensure => present, | |
system => true, | |
gid => git, | |
home => '/var/lib/gitolite3', | |
shell => '/bin/bash', | |
password => '*', | |
comment => 'git repository hosting,,,', | |
} | |
git::clone { 'git://github.com/sitaramc/gitolite': | |
creates => '/opt/gitolite', | |
} | |
exec { '/opt/gitolite/install': | |
command => '/opt/gitolite/install -ln /usr/local/bin', | |
path => '/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin:/usr/local/sbin', | |
user => root, | |
group => root, | |
creates => '/usr/local/bin/gitolite', | |
require => Git::Clone['git://github.com/sitaramc/gitolite'], | |
} | |
File { | |
owner => git, | |
group => git, | |
require => User['git'], | |
} | |
file { '/var/lib/gitolite3': | |
ensure => directory, | |
mode => 0644, | |
} | |
file { '/var/lib/gitolite3/admin.pub': | |
ensure => file, | |
mode => 0644, | |
source => 'puppet:///modules/gitolite/admin.pub', | |
notify => Exec['gitolite setup'], | |
} | |
file { '/var/lib/gitolite3/.gitolite.rc': | |
ensure => file, | |
mode => 0644, | |
source => 'puppet:///modules/gitolite/gitolite.rc', | |
notify => Exec['gitolite setup'], | |
} | |
exec { 'gitolite setup': | |
command => 'gitolite setup --pubkey admin.pub', | |
path => '/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin:/usr/local/sbin', | |
user => git, | |
group => git, | |
cwd => '/var/lib/gitolite', | |
refreshonly => true, | |
require => Exec['/opt/gitolite/install'], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment