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 |
dmorgan |
131 |
|
12 |
|
|
package { "perl-SVN-Notify-Config": |
13 |
|
|
ensure => installed, |
14 |
|
|
} |
15 |
|
|
|
16 |
misc |
83 |
} |
17 |
|
|
|
18 |
|
|
# TODO create proper hook directory ( see zarb.org ) |
19 |
|
|
# create documentation |
20 |
|
|
# - group who can commit |
21 |
|
|
|
22 |
|
|
# define repository ($group => "svn") { |
23 |
|
|
# # $name ==> lieu du checkout |
24 |
|
|
# exec { "svnadmin create $name": |
25 |
|
|
# path => "/usr/bin:/usr/sbin:/bin", |
26 |
|
|
# creates => $name |
27 |
|
|
# } |
28 |
|
|
# # TODO complete documentation |
29 |
|
|
# file { "$name": |
30 |
|
|
# mode => 660 |
31 |
|
|
# recurse => true |
32 |
|
|
# } |
33 |
|
|
# # file pour les hooks |
34 |
|
|
# } |
35 |
|
|
|
36 |
|
|
|
37 |
|
|
class client { |
38 |
|
|
package { subversion: |
39 |
|
|
ensure => installed, |
40 |
|
|
} |
41 |
misc |
101 |
# svn spam log with |
42 |
|
|
# Oct 26 13:30:01 valstar svn: No worthy mechs found |
43 |
|
|
# without it, source http://mail-index.netbsd.org/pkgsrc-users/2008/11/23/msg008706.html |
44 |
|
|
# |
45 |
|
|
package {"lib64sasl2-plug-anonymous": |
46 |
|
|
ensure => "installed" |
47 |
|
|
} |
48 |
misc |
83 |
} |
49 |
|
|
|
50 |
|
|
# TODO ensure that subversion ishere |
51 |
|
|
# allow to configure the snapshot refresh interval |
52 |
misc |
95 |
define snapshot($source, $refresh = '*/5', $user = 'root') { |
53 |
misc |
158 |
|
54 |
misc |
161 |
include subversion::client |
55 |
misc |
158 |
|
56 |
misc |
83 |
exec { "/usr/bin/svn co $source $name": |
57 |
|
|
creates => $name, |
58 |
|
|
user => $user, |
59 |
|
|
} |
60 |
|
|
|
61 |
|
|
cron { "update $name": |
62 |
|
|
command => "cd $name && /usr/bin/svn update -q", |
63 |
|
|
user => $user, |
64 |
misc |
95 |
minute => $refresh |
65 |
misc |
83 |
} |
66 |
|
|
} |
67 |
|
|
} |