Puppet Class: wmfmariadbpy

Defined in:
modules/wmfmariadbpy/manifests/init.pp

Overview

SPDX-License-Identifier: Apache-2.0 Profile to setup and configure wmfmariadbpy libraries and utilities.

Parameters:

  • role (Wmfmariadbpy::Role) (defaults to: 'db')
  • section_ports (Hash[String, Stdlib::Port]) (defaults to: {})


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
29
30
31
32
# File 'modules/wmfmariadbpy/manifests/init.pp', line 4

class wmfmariadbpy (
    Wmfmariadbpy::Role         $role          = 'db',
    Hash[String, Stdlib::Port] $section_ports = {},
) {

    file{'/etc/wmfmariadbpy':
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }
    file{'/etc/wmfmariadbpy/section_ports.csv':
        ensure  => file,
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
        content => template('wmfmariadbpy/section_ports.csv.erb'),
    }

    # Always install this explicitly, so that other puppet modules can refer to it.
    ensure_packages('python3-wmfmariadbpy')

    $extra_packages = $role ? {
        'admin'   => ['wmfmariadbpy-admin'],
        'library' => [],
        default   => ['wmfmariadbpy-common'],
    }
    ensure_packages($extra_packages)
}