Puppet Class: scap::scripts

Defined in:
modules/scap/manifests/scripts.pp

Overview

class: scap::scripts

Sets up commonly used scripts useful on scap masters FIXME: Why isn't this in a package? FIXME: Why are these in a combination of languages? FIXME: Why are these named-like-this and namedLikeThis FIXME: Why man pages for some but not all? FIXME: What on earth does MW have to do with this? Send it to the right module

Parameters:

  • rsync_host (Stdlib::Host) (defaults to: "deployment.${::site}.wmnet")
  • statsd (String) (defaults to: 'statsd.eqiad.wmnet:8125')
  • sql_scripts (Wmflib::Ensure) (defaults to: present)


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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'modules/scap/manifests/scripts.pp', line 9

class scap::scripts (
    Stdlib::Host $rsync_host = "deployment.${::site}.wmnet",
    String $statsd = 'statsd.eqiad.wmnet:8125',
    Wmflib::Ensure $sql_scripts = present,
){

    file { '/usr/local/bin/logstash_checker.py':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/service/logstash_checker.py',
    }

    file { '/usr/local/bin/dologmsg':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/dologmsg',
    }
    file { '/usr/local/bin/mwgrep':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/mwgrep.py',
    }
    file { '/usr/local/bin/foreachwiki':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/foreachwiki',
    }
    file { '/usr/local/bin/foreachwikiindblist':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/foreachwikiindblist',
    }
    file { '/usr/local/bin/expanddblist':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/expanddblist',
    }
    file { '/usr/local/bin/mwscript':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/mwscript',
    }
    file { '/usr/local/bin/mwscriptwikiset':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/mwscriptwikiset',
    }
    file { '/usr/local/bin/purge-varnish':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/purge-varnish',
    }
    file { '/usr/local/bin/set-group-write':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/set-group-write',
    }
    file { '/usr/local/bin/sql':
        ensure => $sql_scripts,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/sql',
    }
    file { '/usr/local/bin/sqldump':
        ensure => $sql_scripts,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/sqldump',
    }
    file { '/usr/local/sbin/set-group-write2':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/set-group-write2',
    }
        # Manpages
        # Need to be generated manually using make in modules/scap/files/manpages
    file { '/usr/local/share/man/man1':
        ensure  => 'directory',
        recurse => true,
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        source  => 'puppet:///modules/scap/manpages/man',
    }
    file { '/usr/local/bin/sudo-withagent':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/scap/sudo-withagent',
    }
    file { '/usr/local/lib/mw-deployment-vars.sh':
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        content => template('scap/mw-deployment-vars.erb'),
    }

    # Clean up old cruft
    file { '/usr/local/bin/clear-profile':
        ensure => 'absent',
    }
    file { '/usr/local/bin/udprec':
        ensure => 'absent',
    }
}