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