diff options
author | Michael Scherer <misc@mageia.org> | 2012-03-15 22:55:12 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-03-15 22:55:12 +0000 |
commit | bb97ef6499e5ec31064e260645a1a01abc73d886 (patch) | |
tree | a1a877a0ed4827e7be10e0afa9dbee326726f4e5 /modules/git/manifests/repository.pp | |
parent | 256365022c30c836e6df619d53a9cdbb7814542e (diff) | |
download | puppet-bb97ef6499e5ec31064e260645a1a01abc73d886.tar puppet-bb97ef6499e5ec31064e260645a1a01abc73d886.tar.gz puppet-bb97ef6499e5ec31064e260645a1a01abc73d886.tar.bz2 puppet-bb97ef6499e5ec31064e260645a1a01abc73d886.tar.xz puppet-bb97ef6499e5ec31064e260645a1a01abc73d886.zip |
clean git module, and some partial splitting
Diffstat (limited to 'modules/git/manifests/repository.pp')
-rw-r--r-- | modules/git/manifests/repository.pp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/modules/git/manifests/repository.pp b/modules/git/manifests/repository.pp new file mode 100644 index 00000000..286ff45e --- /dev/null +++ b/modules/git/manifests/repository.pp @@ -0,0 +1,40 @@ +class git::repository($group, + $description = '') { + + include git::server + # http://eagleas.livejournal.com/18907.html + # TODO group permission should be handled here too + exec { "/usr/local/bin/create_git_repo.sh $name": + user => 'root', + group => $group, + creates => $name, + } + + file { "$name/git-daemon-export-ok": + require => Exec["/usr/local/bin/create_git_repo.sh $name"] + } + + file { "$name/description": + content => $description, + require => File["$name/git-daemon-export-ok"] + } + + file { "$name/hooks/post-receive": + mode => '0755', + content => template('git/post-receive'), + require => File["$name/git-daemon-export-ok"] + } + + file { "$name/config.puppet": + require => File["$name/git-daemon-export-ok"], + notify => Exec["/usr/local/bin/apply_git_puppet_config.sh $name"], + content => template('git/config.puppet'), + } + + # $name is not really used, but this prevent duplicate declaration error + exec { "/usr/local/bin/apply_git_puppet_config.sh $name": + cwd => $name, + user => 'root', + refreshonly => true, + } +} |