Puppet Class: publichtml

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

Overview

server with user public_html directories enabled and nothing else no critical services, in fact no services at all should run here

Parameters:

  • sitename (Stdlib::Fqdn) (defaults to: undef)
  • docroot (Stdlib::Unixpath) (defaults to: '/srv/org/wikimedia/publichtml')
  • server_admin (String) (defaults to: undef)


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
# File 'modules/publichtml/manifests/init.pp', line 3

class publichtml(
    Stdlib::Fqdn $sitename = undef,
    Stdlib::Unixpath $docroot = '/srv/org/wikimedia/publichtml',
    String $server_admin = undef,
) {

    system::role { 'publichtml':
        description => 'web server of public_html directories',
    }

    httpd::site { $sitename:
        content => template('publichtml/apacheconfig.erb'),
    }

    file { '/srv/org':
        ensure => 'directory',
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }

    file { '/srv/org/wikimedia':
        ensure => 'directory',
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }

    file { $docroot:
        ensure => 'directory',
        mode   => '0755',
        owner  => 'root',
        group  => 'root',
    }

    file { "${docroot}/index.html":
        content => template('publichtml/index.html.erb'),
        mode    => '0444',
        owner   => 'root',
        group   => 'root',
    }

    monitoring::service { 'http-peopleweb':
        description   => 'HTTP-peopleweb',
        check_command => "check_http_url!${sitename}!http://${sitename}",
        notes_url     => 'https://wikitech.wikimedia.org/wiki/People.wikimedia.org',
    }
}