Puppet Class: profile::microsites::os_reports

Defined in:
modules/profile/manifests/microsites/os_reports.pp

Overview

Parameters:

  • os_reports_host (Stdlib::Host) (defaults to: lookup('profile::sre::os_reports::host'))


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
# File 'modules/profile/manifests/microsites/os_reports.pp', line 1

class profile::microsites::os_reports (
    Stdlib::Host $os_reports_host = lookup('profile::sre::os_reports::host'),
) {
    $docroot  = '/srv/org/wikimedia/os-reports'
    wmflib::dir::mkdir_p($docroot)

    httpd::site { 'os-reports.wikimedia.org':
        content => template('role/apache/sites/os-reports.wikimedia.org.erb'),
    }

    file { '/srv/org/wikimedia/os-reports/base.css':
        ensure => present,
        owner  => 'www-data',
        group  => 'www-data',
        mode   => '0400',
        source => 'puppet:///modules/profile/microsites/os-reports-base.css';
    }

    ensure_packages('rsync')

    systemd::timer::job { 'sync_os_reports':
        ensure          => present,
        description     => 'Sync OS migration reports/overview',
        user            => 'root',
        logging_enabled => false,
        send_mail       => false,
        command         => "/usr/bin/rsync -tr rsync://${os_reports_host}/osreports/ ${docroot}",
        interval        => {'start' => 'OnCalendar', 'interval' => '*-*-* 03:00:00'},
    }
}