Puppet Class: profile::toolforge::disable_tool

Defined in:
modules/profile/manifests/toolforge/disable_tool.pp

Overview

Parameters:

  • ldap_config (Hash) (defaults to: lookup('ldap'))
  • novaadmin_bind_dn (String) (defaults to: lookup('profile::openstack::base::ldap_user_dn'))
  • novaadmin_bind_pass (String) (defaults to: lookup('profile::openstack::eqiad1::ldap_user_pass'))
  • tools_db_host (Stdlib::Fqdn) (defaults to: lookup('profile::toolforge::disable_tool::disable_tool_db_host', {default_value => 'tools.db.svc.wikimedia.cloud'}))
  • tools_db_password (String) (defaults to: lookup('profile::toolforge::disable_tool::disable_tool_db_password'))


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
# File 'modules/profile/manifests/toolforge/disable_tool.pp', line 1

class profile::toolforge::disable_tool (
    Hash         $ldap_config         = lookup('ldap'),
    String       $novaadmin_bind_dn   = lookup('profile::openstack::base::ldap_user_dn'),
    String       $novaadmin_bind_pass = lookup('profile::openstack::eqiad1::ldap_user_pass'),
    Stdlib::Fqdn $tools_db_host       = lookup('profile::toolforge::disable_tool::disable_tool_db_host', {default_value => 'tools.db.svc.wikimedia.cloud'}),
    String       $tools_db_password   = lookup('profile::toolforge::disable_tool::disable_tool_db_password'),
) {
    $ldap_uri = "ldap://${ldap_config['rw-server']}:389"

    ensure_packages(['python3-pymysql'])

    file { '/etc/disable_tool.conf':
        ensure    => file,
        owner     => 'root',
        group     => 'root',
        mode      => '0500',
        content   => template('profile/toolforge/disable_tool.conf.erb'),
        show_diff => false,
    }
    git::clone { 'repos/cloud/toolforge/disable-tool':
        ensure    => latest,
        source    => 'gitlab',
        directory => '/srv/disable-tool',
    }
}