Puppet Class: pontoon::sd

Defined in:
modules/pontoon/manifests/sd.pp

Overview

Parameters:

  • lb_address (Stdlib::IP::Address)
  • nameservers (Array[Stdlib::IP::Address])
  • services_config (Hash[String, Wmflib::Service])


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/pontoon/manifests/sd.pp', line 14

class pontoon::sd (
    Stdlib::IP::Address $lb_address,
    Array[Stdlib::IP::Address] $nameservers,
    Hash[String, Wmflib::Service] $services_config,
) {
    ensure_packages('dnsmasq')

    $services = pontoon::service_names($services_config)

    file { '/etc/pontoon-sd':
        ensure => directory,
    }

    file { '/etc/pontoon-sd/resolv':
        content => template('pontoon/dnsmasq.resolv'),
        notify  => Exec['dnsmasq-reload'],
    }

    file { '/etc/pontoon-sd/hosts':
        content => template('pontoon/dnsmasq.hosts'),
        notify  => Exec['dnsmasq-reload'],
    }

    file { '/etc/dnsmasq.d/pontoon-sd.conf':
        content => template('pontoon/dnsmasq.conf'),
        notify  => Service['dnsmasq'],
    }

    service { 'dnsmasq':
        ensure => running,
    }

    exec { 'dnsmasq-reload':
        command     => '/bin/systemctl reload dnsmasq',
        refreshonly => true,
    }
}