Puppet Class: profile::alertmanager::api

Defined in:
modules/profile/manifests/alertmanager/api.pp

Overview

Parameters:

  • vhost (String) (defaults to: lookup('profile::alertmanager::api::vhost', {'default_value' => "alertmanager.${facts['domain']}"}))
  • vhost_alias (Optional[String]) (defaults to: lookup('profile::alertmanager::api::vhost_alias', {'default_value' => undef}))
  • ro (Array[Httpd::RequireHostIP]) (defaults to: lookup('profile::alertmanager::api::ro'))
  • rw (Array[Httpd::RequireHostIP]) (defaults to: lookup('profile::alertmanager::api::rw'))


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'modules/profile/manifests/alertmanager/api.pp', line 4

class profile::alertmanager::api (
    # lint:ignore:wmf_styleguide - T260574
    String $vhost  = lookup('profile::alertmanager::api::vhost', {'default_value' => "alertmanager.${facts['domain']}"}),
    Optional[String] $vhost_alias  = lookup('profile::alertmanager::api::vhost_alias', {'default_value' => undef}),
    # lint:endignore
    Array[Httpd::RequireHostIP] $ro = lookup('profile::alertmanager::api::ro'),
    Array[Httpd::RequireHostIP] $rw = lookup('profile::alertmanager::api::rw'),
) {

    $ro_hosts = $ro.filter |$el| { $el =~ Stdlib::Fqdn }
    $ro_ips = $ro.filter |$el|   { $el =~ Stdlib::IP::Address }
    $rw_hosts = $rw.filter |$el| { $el =~ Stdlib::Fqdn }
    $rw_ips = $rw.filter |$el|   { $el =~ Stdlib::IP::Address }

    httpd::site { $vhost:
        content => template('profile/alertmanager/api.apache.erb'),
    }
}