Puppet Class: dumps::generation::server::statsender

Defined in:
modules/dumps/manifests/generation/server/statsender.pp

Overview

Parameters:

  • dumpsbasedir (Any) (defaults to: undef)
  • sender_address (Any) (defaults to: undef)
  • user (Any) (defaults to: undef)


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
# File 'modules/dumps/manifests/generation/server/statsender.pp', line 1

class dumps::generation::server::statsender(
    $dumpsbasedir   = undef,
    $sender_address = undef,
    $user           = undef,
)  {
    file { '/usr/local/bin/get_dump_stats.sh':
        ensure => 'present',
        mode   => '0755',
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/dumps/generation/get_dump_stats.sh',
    }

    if os_version('debian >= buster') {
        require_package('s-nail')
    } else {
        require_package('heirloom-mailx')
    }
    cron { 'dumps-stats-sender':
        ensure      => 'present',
        environment => 'MAILTO=ops-dumps@wikimedia.org',
        command     => "/bin/bash /usr/local/bin/get_dump_stats.sh --dumpsbasedir ${dumpsbasedir} --sender_address ${sender_address}",
        user        => $user,
        minute      => '30',
        hour        => '1',
        monthday    => '26',
        require     => File['/usr/local/bin/get_dump_stats.sh'],
    }
}