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