/[adm]/puppet/modules/git/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/git/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2669 - (show annotations) (download)
Thu Mar 22 10:47:04 2012 UTC (10 years, 3 months ago) by misc
File size: 1042 byte(s)
split more file
1 class git {
2 define svn_repository($source,
3 $std_layout = true,
4 $refresh = '*/5') {
5 include git::svn
6 include git::server
7 # a cron job
8 # a exec
9 if $std_layout {
10 $options = '-s'
11 } else {
12 $options = ''
13 }
14
15 exec { "/usr/bin/git svn init $options $source $name":
16 alias => "git svn $name",
17 creates => $name,
18 }
19
20 file { '/usr/local/bin/update_git_svn.sh':
21 mode => '0755',
22 source => 'puppet:///modules/git/update_git_svn.sh',
23 }
24
25 cron { "update $name":
26 # done in 2 times, so fetch can fill the repo after init
27 command => "/usr/local/bin/update_git_svn.sh $name" ,
28 minute => $refresh
29 }
30
31 file { "$name/.git/hooks/pre-receive":
32 mode => '0755',
33 content => template('git/pre-receive'),
34 require => Exec["git svn $name"]
35 }
36 }
37
38 }

  ViewVC Help
Powered by ViewVC 1.1.28