Puppet Class: dumps::web::rsync::nginxlogs

Defined in:
modules/dumps/manifests/web/rsync/nginxlogs.pp

Overview

Parameters:

  • dest (Any) (defaults to: undef)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'modules/dumps/manifests/web/rsync/nginxlogs.pp', line 1

class dumps::web::rsync::nginxlogs (
    $dest   = undef,
)
{
    ensure_packages('rsync')

    $rsync_args = '--include "*.gz" --exclude "*" -rt --perms --chmod=go+r --bwlimit=50000'
    systemd::timer::job { 'rsync_nginxlogs':
        ensure             => present,
        description        => 'Regular jobs to rsync nginx logs',
        user               => 'root',
        monitoring_enabled => false,
        send_mail          => true,
        environment        => {'MAILTO' => 'ops-dumps@wikimedia.org'},
        command            => "/usr/bin/rsync ${rsync_args} /var/log/nginx/ ${dest}",
        interval           => {'start' => 'OnCalendar', 'interval' => '*-*-* 4:55:0'},
    }
}