Puppet Class: profile::toolforge::services::updatetools

Defined in:
modules/profile/manifests/toolforge/services/updatetools.pp

Overview

Parameters:

  • active_node (Any) (defaults to: hiera('profile::toolforge::services::active_node'))
  • updatetools_enabled (Any) (defaults to: hiera('profile::toolforge::services::updatetools_enabled'))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'modules/profile/manifests/toolforge/services/updatetools.pp', line 1

class profile::toolforge::services::updatetools(
    $active_node = hiera('profile::toolforge::services::active_node'),
    $updatetools_enabled = hiera('profile::toolforge::services::updatetools_enabled'),
) {
    require_package('python-mysqldb')

    file { '/usr/local/bin/updatetools':
        ensure => file,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/profile/toolforge/services/updatetools',
    }

    systemd::service { 'updatetools':
        ensure         => present,
        content        => systemd_template('updatetools'),
        restart        => true,
        override       => false,
        require        => File['/usr/local/bin/updatetools'],
        service_params => {
            ensure     => ensure_service($updatetools_enabled and $::fqdn == $active_node),
        },
        subscribe      => [
            File['/usr/local/bin/updatetools'],
        ],
    }
}