Puppet Class: librenms::web

Defined in:
modules/librenms/manifests/web.pp

Overview

Parameters:

  • sitename (Stdlib::Fqdn)
  • install_dir (Stdlib::Unixpath)
  • active_server (Stdlib::Fqdn)


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

class librenms::web(
    Stdlib::Fqdn $sitename,
    Stdlib::Unixpath $install_dir,
    Stdlib::Fqdn $active_server,
) {

    $ssl_settings = ssl_ciphersuite('apache', 'strong', true)

    httpd::site { $sitename:
        content => template('librenms/apache.conf.erb'),
    }

    acme_chief::cert { 'librenms':
        puppet_svc => 'apache2',
    }

    if $active_server == $::fqdn {
        $monitoring_ensure = 'present'
    } else {
        $monitoring_ensure = 'absent'
    }

    monitoring::service { 'https':
        ensure        => $monitoring_ensure,
        description   => 'HTTPS',
        check_command => 'check_ssl_http_letsencrypt!librenms.wikimedia.org',
        notes_url     => 'https://wikitech.wikimedia.org/wiki/LibreNMS',
    }

    monitoring::service { 'librenms':
        ensure        => $monitoring_ensure,
        description   => 'LibreNMS HTTPS',
        check_command => "check_https_url!${sitename}!http://${sitename}",
        notes_url     => 'https://wikitech.wikimedia.org/wiki/LibreNMS',
    }
}