Puppet Class: peek

Defined in:
modules/peek/manifests/init.pp

Overview

Parameters:

  • to_email (String)
  • asana_token (String)
  • phab_token (String)
  • template_dir (Stdlib::Unixpath) (defaults to: '/var/lib/peek/git/templates/')


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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'modules/peek/manifests/init.pp', line 2

class peek (
    String $to_email,
    String $asana_token,
    String $phab_token,
    Stdlib::Unixpath $template_dir='/var/lib/peek/git/templates/',
    )
{
    include ::peek::cron

    package { [
        'python3-jinja2',
        'python3-phabricator',
        'python3-asana',
        'python3-requests-oauthlib',
        'python3-unittest2',
        'python3-testtools',
    ]:
        ensure => present,
    }

    group {'peek':
        ensure => 'present',
        system => true,
    }

    user { 'peek':
        name       => 'peek',
        comment    => 'Security Team PM tooling',
        home       => '/var/lib/peek',
        managehome => true,
        shell      => false,
        system     => true,
    }

    file { '/var/lib/peek/.profile':
        ensure  => 'present',
        owner   => 'peek',
        group   => 'peek',
        mode    => '0655',
        content => template('peek/profile.erb'),
    }

    file { '/etc/peek':
        ensure => 'directory',
        owner  => 'peek',
        group  => 'peek',
        mode   => '0640',
    }

    file { '/etc/peek/config':
        ensure  => 'directory',
        owner   => 'peek',
        group   => 'peek',
        mode    => '0640',
        require => File['/etc/peek'],
    }

    file {'/etc/peek/config/base.conf':
        owner   => 'peek',
        group   => 'peek',
        mode    => '0444',
        content => template('peek/base.conf.erb'),
        require => File['/etc/peek/config'],
    }

    file {'/etc/peek/config/weekly.conf':
        owner   => 'peek',
        group   => 'peek',
        mode    => '0444',
        content => template('peek/weekly.conf.erb'),
        require => File['/etc/peek/config'],
    }

    file {'/etc/peek/config/monthly.conf':
        owner   => 'peek',
        group   => 'peek',
        mode    => '0444',
        content => template('peek/monthly.conf.erb'),
        require => File['/etc/peek/config'],
    }

    git::clone { 'wikimedia/security/tooling/peek':
        directory => '/var/lib/peek/git',
        branch    => 'master',
        owner     => 'peek',
        group     => 'peek',
    }

    file {'/var/lib/peek/git/peek.py':
        mode => '0755',
    }
}