Puppet Class: ncmonitor::public_suffix_list

Defined in:
modules/ncmonitor/manifests/public_suffix_list.pp

Overview

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: 'present')
  • suffix_list_url (Stdlib::HTTPUrl) (defaults to: 'https://publicsuffix.org/list/public_suffix_list.dat')
  • suffix_list_dir (Stdlib::Absolutepath) (defaults to: '/var/lib/ncmonitor')
  • suffix_file_name (String) (defaults to: 'public_suffix_list.dat')
  • http_proxy (Optional[Stdlib::HTTPUrl]) (defaults to: undef)


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
# File 'modules/ncmonitor/manifests/public_suffix_list.pp', line 9

class ncmonitor::public_suffix_list (
    Wmflib::Ensure            $ensure           = 'present',
    Stdlib::HTTPUrl           $suffix_list_url  = 'https://publicsuffix.org/list/public_suffix_list.dat',
    Stdlib::Absolutepath      $suffix_list_dir  = '/var/lib/ncmonitor',
    String                    $suffix_file_name = 'public_suffix_list.dat',
    Optional[Stdlib::HTTPUrl] $http_proxy       = undef,
){
    file { $suffix_list_dir:
        ensure => stdlib::ensure($ensure, 'directory'),
        owner  => 'ncmonitor',
        group  => 'root',
        mode   => '0755',
    }

    $suffix_list_abs_path = Stdlib::AbsolutePath("${suffix_list_dir}/${suffix_file_name}")
    file {'/usr/local/bin/ncmonitor-update-psl':
        ensure  => stdlib::ensure($ensure, 'file'),
        content => template('ncmonitor/ncmonitor-update-psl.sh.erb'),
        owner   => 'root',
        group   => 'root',
        mode    => '0755',
    }

    systemd::unit { 'ncmonitor-update-psl.service':
        ensure  => $ensure,
        content => template('ncmonitor/ncmonitor-update-psl.service.erb'),
    }

    systemd::timer { 'ncmonitor-update-psl':
        ensure          => $ensure,
        timer_intervals => [
            {
                'start'    => 'OnCalendar',
                'interval' => 'weekly',
            }
        ]
    }
}