Puppet Class: profile::conftool::state

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

Overview

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: hiera('profile::conftool::state::ensure'))
  • prefix (String) (defaults to: hiera('conftool_prefix'))
  • query_interval (Integer) (defaults to: hiera('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
# File 'modules/profile/manifests/conftool/state.pp', line 10

class profile::conftool::state(
    Wmflib::Ensure $ensure = hiera('profile::conftool::state::ensure'),
    String $prefix = hiera('conftool_prefix'),
    Integer $query_interval = hiera('profile::conftool::state::query_interval'),
) {
    class { '::confd':
        ensure   => $ensure,
        prefix   => $prefix,
        interval => $query_interval
    }

    $base_dir = '/etc/conftool-state'
    file { $base_dir:
        ensure => ensure_directory($ensure),
        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')
    }
}