Puppet Class: mirrors::tails

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

class mirrors::tails {
    require mirrors

    $local_dir = '/srv/mirrors/tails'
    $remote_path = 'mirrors.rsync.tails.boum.org::amnesia-archive/tails/'

    file { $local_dir:
        ensure => directory,
        owner  => 'mirror',
        group  => 'mirror',
        mode   => '0755',
    }

    $rsync_cmd = "/usr/bin/rsync -rt --delete ${remote_path} ${local_dir}"

    systemd::timer::job { 'update-tails-mirror':
        ensure      => 'present',
        user        => 'mirror',
        description => 'update the tails mirror with rsync',
        command     => $rsync_cmd,
        interval    => {'start' => 'OnUnitInactiveSec', 'interval' => '1h'},
    }

}