1 |
misc |
83 |
# should be replaced by vcsrepo |
2 |
|
|
# https://github.com/reductivelabs/puppet-vcsrepo |
3 |
|
|
# but not integrated in puppet directly for the moment |
4 |
|
|
class subversion { |
5 |
|
|
|
6 |
|
|
|
7 |
|
|
class server { |
8 |
|
|
package { "subversion-server": |
9 |
|
|
ensure => installed, |
10 |
|
|
} |
11 |
|
|
} |
12 |
|
|
|
13 |
|
|
# TODO create proper hook directory ( see zarb.org ) |
14 |
|
|
# create documentation |
15 |
|
|
# - group who can commit |
16 |
|
|
|
17 |
|
|
# define repository ($group => "svn") { |
18 |
|
|
# # $name ==> lieu du checkout |
19 |
|
|
# exec { "svnadmin create $name": |
20 |
|
|
# path => "/usr/bin:/usr/sbin:/bin", |
21 |
|
|
# creates => $name |
22 |
|
|
# } |
23 |
|
|
# # TODO complete documentation |
24 |
|
|
# file { "$name": |
25 |
|
|
# mode => 660 |
26 |
|
|
# recurse => true |
27 |
|
|
# } |
28 |
|
|
# # file pour les hooks |
29 |
|
|
# } |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
class client { |
33 |
|
|
package { subversion: |
34 |
|
|
ensure => installed, |
35 |
|
|
} |
36 |
misc |
101 |
# svn spam log with |
37 |
|
|
# Oct 26 13:30:01 valstar svn: No worthy mechs found |
38 |
|
|
# without it, source http://mail-index.netbsd.org/pkgsrc-users/2008/11/23/msg008706.html |
39 |
|
|
# |
40 |
|
|
package {"lib64sasl2-plug-anonymous": |
41 |
|
|
ensure => "installed" |
42 |
|
|
} |
43 |
misc |
83 |
} |
44 |
|
|
|
45 |
|
|
# TODO ensure that subversion ishere |
46 |
|
|
# allow to configure the snapshot refresh interval |
47 |
misc |
95 |
define snapshot($source, $refresh = '*/5', $user = 'root') { |
48 |
misc |
83 |
exec { "/usr/bin/svn co $source $name": |
49 |
|
|
creates => $name, |
50 |
|
|
user => $user, |
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
cron { "update $name": |
54 |
|
|
command => "cd $name && /usr/bin/svn update -q", |
55 |
|
|
user => $user, |
56 |
misc |
95 |
minute => $refresh |
57 |
misc |
83 |
} |
58 |
|
|
} |
59 |
|
|
} |