aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mgasoft/manifests/init.pp
blob: c71d0071de9d895be5dd0ef1e0b3617c61260331 (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
class mgasoft(
    $anonsvn_soft = 'svn+ssh://svn.mageia.org/svn/soft',
    $pubinfodir = '/var/lib/mgasoft/infos',
    $pubmirrordir = '/distrib/mirror/software',
    $svn_soft_publish = 'svn+ssh://svn.mageia.org/svn/soft_publish',
    $mgasoft_login = 'mgasoft'
) {
    group { $mgasoft_login:
	ensure => present,
    }
    user { $mgasoft_login:
	ensure => present,
	comment => "System user to publish software",
	managehome => true,
	home => "/var/lib/$mgasoft_login",
	gid => $mgasoft_login,
	require => Group[$mgasoft_login],
    }

    package { 'mgasoft-publish':
	ensure => installed,
    }

    file { '/etc/mgasoft.conf':
	ensure => present,
	owner => root,
	group => root,
	mode => 644,
	content => template('mgasoft/mgasoft.conf'),
    }

    subversion::snapshot { $pubinfodir:
	source => $svn_soft_publish,
	user => $mgasoft_login,
	refresh => '0',
	require => User[$mgasoft_login],
    }
}