Puppet Class: mirrors::openstack

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

Overview

Contact in the remote end: “zigo” Thomas Goirand <zigo@debian.org>



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

class mirrors::openstack {
    require mirrors

    $local_dir = '/srv/mirrors/osbpo'
    $remote_path = 'osbpo.debian.net::osbpo/'

    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-openstack-mirror':
        ensure              => present,
        description         => 'Update mirror for openstack repository',
        command             => $rsync_cmd,
        interval            => {
            'start'    => 'OnCalendar',
            'interval' => '*-*-* 08:00:00', # daily at 08:00 UTC as requested
        },
        max_runtime_seconds => 72000, # kill if running after 20h
        monitoring_enabled  => false,
        user                => 'mirror',
    }
}