Puppet Class: openstack::designate::dns_floating_ip_updater

Defined in:
modules/openstack/manifests/designate/dns_floating_ip_updater.pp

Summary

Script to update PTR records for floating IPs

Overview

Parameters:

  • ensure (Wmflib::Ensure)

    ensure the job is present/running or not

  • project_zone_template (String[1])

    template to use when generating zone names for projects

  • reverse_zone_project (String[1])

    project in which the in-addr.arpa. reverse zones live



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/openstack/manifests/designate/dns_floating_ip_updater.pp', line 5

class openstack::designate::dns_floating_ip_updater (
    Wmflib::Ensure $ensure,
    String[1]      $project_zone_template,
    String[1]      $reverse_zone_project,
) {
    $config = {
        'project_zone_template' => $project_zone_template,
        'reverse_zone_project'  => $reverse_zone_project,
        'retries'               => 2,
        'retry_interval'        => 120,
    }

    file { '/etc/wmcs-dns-floating-ip-updater.yaml':
        ensure  => 'present',
        owner   => 'root',
        group   => 'root',
        mode    => '0440',
        content => to_yaml($config),
    }

    file { '/usr/local/sbin/wmcs-dns-floating-ip-updater':
        ensure => 'present',
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
        source => 'puppet:///modules/openstack/designate/wmcs-dns-floating-ip-updater.py',
    }

    systemd::timer::job { 'designate_floating_ip_ptr_records_updater':
        ensure              => $ensure,
        description         => 'Designate Floating IP PTR records updater',
        command             => '/usr/local/sbin/wmcs-dns-floating-ip-updater',
        interval            => {
            'start'    => 'OnCalendar',
            'interval' => '*-*-* *:00/15:00', # Every 15 minutes
        },
        max_runtime_seconds => 890,  # kill if running after 14m50s
        logging_enabled     => false,
        monitoring_enabled  => false,
        user                => 'root',
        require             => [
            File['/usr/local/sbin/wmcs-dns-floating-ip-updater'],
            File['/etc/wmcs-dns-floating-ip-updater.yaml'],
        ],
    }
}