Puppet Class: profile::conftool::state

Defined in:
modules/profile/manifests/conftool/state.pp

Overview

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: lookup('profile::conftool::state::ensure'))
  • query_interval (Integer) (defaults to: lookup('profile::conftool::state::query_interval'))


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
# File 'modules/profile/manifests/conftool/state.pp', line 11

class profile::conftool::state(
    Wmflib::Ensure $ensure = lookup('profile::conftool::state::ensure'),
    Integer $query_interval = lookup('profile::conftool::state::query_interval'),
) {
    $instances = {
        'main' => {
            'ensure'   => $ensure,
            'interval' => $query_interval,
        },
    }
    class { 'profile::confd':
        instances => $instances,
    }

    $base_dir = '/etc/conftool-state'
    file { $base_dir:
        ensure => stdlib::ensure($ensure, 'directory'),
        owner  => 'root',
        group  => 'root',
        mode   => '0755'
    }

    # state file containing whatever mediawiki state variables we need to access.
    confd::file { "${base_dir}/mediawiki.yaml":
        ensure     => $ensure,
        prefix     => '/mediawiki-config',
        watch_keys => ['/'],
        content    => template('profile/conftool/state-mediawiki.tmpl.erb')
    }
}