1 |
class mgasoft( |
2 |
$anonsvn_soft = 'svn://svn.mageia.org/svn/soft', |
3 |
$pubinfodir = '/var/lib/mgasoft/infos', |
4 |
$pubmirrordir = '/distrib/mirror/software', |
5 |
$svn_soft_publish = 'file:///svn/soft_publish', |
6 |
$mgasoft_login = 'mgasoft' |
7 |
) { |
8 |
group { $mgasoft_login: } |
9 |
|
10 |
user { $mgasoft_login: |
11 |
comment => 'System user to publish software', |
12 |
managehome => true, |
13 |
home => "/var/lib/$mgasoft_login", |
14 |
gid => $mgasoft_login, |
15 |
require => Group[$mgasoft_login], |
16 |
} |
17 |
|
18 |
package { 'mgasoft-publish': } |
19 |
|
20 |
file { '/etc/mgasoft.conf': |
21 |
content => template('mgasoft/mgasoft.conf'), |
22 |
} |
23 |
|
24 |
subversion::snapshot { $pubinfodir: |
25 |
source => $svn_soft_publish, |
26 |
user => $mgasoft_login, |
27 |
refresh => '0', |
28 |
require => User[$mgasoft_login], |
29 |
} |
30 |
|
31 |
cron { "mgasoft-publish": |
32 |
command => '/usr/bin/mgasoft-publish', |
33 |
user => $mgasoft_login, |
34 |
minute => '*/5', |
35 |
require => User[$mgasoft_login], |
36 |
} |
37 |
} |