Puppet Class: mirrors::debian

Defined in:
modules/mirrors/manifests/debian.pp

Overview



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
# File 'modules/mirrors/manifests/debian.pp', line 15

class mirrors::debian {
    require mirrors
    include passwords::mirrors

    file { '/srv/mirrors/debian':
        ensure => directory,
        owner  => 'mirror',
        group  => 'mirror',
        mode   => '0755',
    }

    package { 'ftpsync':
        ensure => present,
    }

    # package doesn't ship that directory yet
    file { '/etc/ftpsync':
        ensure => directory,
        owner  => 'mirror',
        group  => 'mirror',
        mode   => '0555',
    }

    # this is our configuration for archvsync
    file { '/etc/ftpsync/ftpsync.conf':
        ensure  => present,
        owner   => 'mirror',
        group   => 'mirror',
        mode    => '0444',
        content => template('mirrors/ftpsync.conf.erb'),
    }

    file { '/var/log/ftpsync':
        ensure => directory,
        owner  => 'mirror',
        group  => 'mirror',
        mode   => '0755',
    }

    # allow the Debian syncproxy to trigger ftpsync runs over ssh
    ssh::userkey { 'mirror':
        source => 'puppet:///modules/mirrors/ssh-debian-archvsync.pub',
    }

    # serve via rsync
    rsync::server::module { 'debian':
        path      => '/srv/mirrors/debian/',
        read_only => 'yes',
        uid       => 'nobody',
        gid       => 'nogroup',
    }

}