Puppet Class: profile::toolforge::grid::webservicemonitor

Defined in:
modules/profile/manifests/toolforge/grid/webservicemonitor.pp

Overview

Parameters:

  • active_host (Stdlib::Fqdn) (defaults to: lookup('profile::toolforge::grid::webservicemonitor::active_host'))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'modules/profile/manifests/toolforge/grid/webservicemonitor.pp', line 1

class profile::toolforge::grid::webservicemonitor(
    Stdlib::Fqdn $active_host = lookup('profile::toolforge::grid::webservicemonitor::active_host'),
) {
    include profile::toolforge::k8s::client

    $is_active = $active_host == $::facts['fqdn']

    # webservicemonitor stuff, previously in services nodes
    package { 'tools-manifest':
        ensure => latest,
    }

    service { 'webservicemonitor':
        ensure    => $is_active.bool2str('running', 'stopped'),
        subscribe => Package['tools-manifest'],
    }
}