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'))
  • prefix (String) (defaults to: lookup('conftool_prefix'))
  • query_interval (Integer) (defaults to: lookup('profile::conftool::state::query_interval'))


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

class profile::conftool::state(
    Wmflib::Ensure $ensure = lookup('profile::conftool::state::ensure'),
    String $prefix = lookup('conftool_prefix'),
    Integer $query_interval = lookup('profile::conftool::state::query_interval'),
) {
    class { '::confd':
        ensure   => $ensure,
        prefix   => $prefix,
        interval => $query_interval,
        srv_dns  => "${::site}.wmnet",
    }

    $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')
    }
}