diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2009-12-06 11:12:38 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2009-12-06 11:12:38 -0200 |
commit | 10165927fe1847be3451413a72c631fe1a99c1f9 (patch) | |
tree | bbfb7d485ac1db9d6124223114f89f3b8c936386 /manifests/gitosis.pp | |
download | puppet-git-10165927fe1847be3451413a72c631fe1a99c1f9.tar.gz puppet-git-10165927fe1847be3451413a72c631fe1a99c1f9.tar.bz2 |
Initial import
Diffstat (limited to 'manifests/gitosis.pp')
-rw-r--r-- | manifests/gitosis.pp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/manifests/gitosis.pp b/manifests/gitosis.pp new file mode 100644 index 0000000..819fec4 --- /dev/null +++ b/manifests/gitosis.pp @@ -0,0 +1,44 @@ +# This class handles a gitosis installation, with /var/git as the root for +# git repositories. + +class gitosis inherits git { + # directory for gitosis user and repositories + file { "/var/git": + ensure => directory, + mode => 0755, + owner => gitosis, + group => gitosis; + } + + # symbolic link + file { "/var/cache/git": + ensure => "/var/git/repositories", + force => true, + } + + # the needed packages + package { "gitosis": ensure => installed; } + + # alters the user's home dir + user { "gitosis": + allowdupe => false, + comment => "git repository hosting,,,", + ensure => present, + home => "/var/git", + shell => "/bin/sh", + groups => [ "gitosis", "puppet" ], + require => Group["gitosis"]; + } + + # ensures that the group exists + group { "gitosis": + ensure => present, + allowdupe => false; + } + + # tries to get rid of ugly directory structure + file { "/srv/gitosis": + ensure => absent, + force => true; + } +} |