Puppet Class: profile::durum

Defined in:
modules/profile/manifests/durum.pp

Overview

Parameters:

  • domain (Stdlib::Fqdn) (defaults to: lookup('profile::durum::service::domain'))
  • ips (Profile::Durum::Service_ips) (defaults to: lookup('profile::durum::service::ips'))
  • common (Profile::Durum::Common) (defaults to: lookup('profile::durum::service::common'))


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
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
# File 'modules/profile/manifests/durum.pp', line 1

class profile::durum (
  Stdlib::Fqdn                $domain   = lookup('profile::durum::service::domain'),
  Profile::Durum::Service_ips $ips      = lookup('profile::durum::service::ips'),
  Profile::Durum::Common      $common   = lookup('profile::durum::service::common'),
) {

    $durum_path = $common['durum_path']

    $index_file = "${durum_path}/index.html"
    $uuid_js_file = "${durum_path}/uuidv4.js"
    $check_js_file = "${durum_path}/check.js"
    $css_file = "${durum_path}/site.css"

    motd::script { 'durum-motd':
        ensure   => 'present',
        priority => 1,
        content  => file('profile/durum/motd.sh'),
    }

    file { $durum_path:
        ensure => 'directory',
    }

    file {
        default:
            ensure => 'present',
            owner  => 'www-data',
            group  => 'www-data',
            mode   => '0440';
        $index_file:
            content => file('profile/durum/index.html');
        $uuid_js_file:
            content => file('profile/durum/uuidv4.js');
        $check_js_file:
            content => file('profile/durum/check.js');
        $css_file:
            content => file('profile/durum/site.css');
    }

    include network::constants
    ferm::service { 'durum-https':
        proto   => 'tcp',
        notrack => true,
        port    => 443,
    }

    acme_chief::cert { 'durum':
        puppet_svc => 'nginx',
    }

    class { 'sslcert::dhparam': }

    $ssl_settings = ssl_ciphersuite('nginx', 'strong', true)
    nginx::site { 'durum':
        content => template('profile/durum/nginx.conf.erb'),
        require => [
          File[$index_file],
          File[$uuid_js_file],
          File[$check_js_file],
          File[$css_file],
        ]
    }

}