aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mgasoft/manifests/init.pp
blob: 704317013cc7ac100ddd042f690ab24934a009c0 (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
class mgasoft(
    $anonsvn_soft = "svn://svn.${::domain}/svn/soft",
    $pubinfodir = '/var/lib/mgasoft/infos',
    $pubmirrordir = '/distrib/mirror/software',
    $svn_soft_publish = 'file:///svn/soft_publish',
    $mgasoft_login = 'mgasoft'
) {
    group { $mgasoft_login: }

    user { $mgasoft_login:
        managehome => true,
        home       => "/var/lib/${mgasoft_login}",
        gid        => $mgasoft_login,
        require    => Group[$mgasoft_login],
    }

    package { 'mgasoft-publish': }

    file { '/etc/mgasoft.conf':
        content => template('mgasoft/mgasoft.conf'),
    }

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

    cron { "mgasoft-publish":
        command => '/usr/bin/mgasoft-publish',
        user    => $mgasoft_login,
        minute  => '*/5',
        require => User[$mgasoft_login],
    }
}