Puppet Class: profile::mirrors::openstack

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

Overview

SPDX-License-Identifier: Apache-2.0 Contact in the remote end: “zigo” Thomas Goirand <zigo@debian.org>



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/profile/manifests/mirrors/openstack.pp', line 3

class profile::mirrors::openstack {
    include profile::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
        user                => 'mirror',
    }
}