Puppet Class: profile::cumin::unprivmaster

Defined in:
modules/profile/manifests/cumin/unprivmaster.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • puppetdb_host (Stdlib::Host) (defaults to: lookup('puppetdb_host'))
  • datacenters (Array[String]) (defaults to: lookup('datacenters'))
  • kerberos_kadmin_host (Stdlib::Host) (defaults to: lookup('kerberos_kadmin_server_primary'))
  • puppetdb_micro_port (Stdlib::Port) (defaults to: lookup('profile::puppetdb::microservice::port'))


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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'modules/profile/manifests/cumin/unprivmaster.pp', line 2

class profile::cumin::unprivmaster (
    Stdlib::Host  $puppetdb_host        = lookup('puppetdb_host'),
    Array[String] $datacenters          = lookup('datacenters'),
    Stdlib::Host  $kerberos_kadmin_host = lookup('kerberos_kadmin_server_primary'),
    Stdlib::Port  $puppetdb_micro_port  = lookup('profile::puppetdb::microservice::port')
) {
    include profile::kerberos::client

    # These are referenced by the aliases template, but otherwise unused
    $mariadb_roles = Profile::Mariadb::Role
    $mariadb_sections = Profile::Mariadb::Valid_section


    $cumin_log_path = '~/.cumin'
    $ssh_config_path = '/etc/cumin/ssh_config'
    $owners = profile::contacts::get_owners().values.flatten.unique

    ensure_packages([
        'clustershell',  # Installs nodeset CLI that is useful to mangle host lists.
        'cumin',
    ])

    file { '/etc/cumin':
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }

    # Default tqdm has broken spacing in Cumin's output
    apt::package_from_component { 'spicerack':
        component => 'component/spicerack',
        packages  => ['python3-tqdm'],
        priority  => 1002,
    }

    file { '/etc/cumin/config.yaml':
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
        content => template('profile/cumin/config-unpriv.yaml.erb'),
        require => File['/etc/cumin'],
    }

    file { '/etc/cumin/aliases.yaml':
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
        content => template('profile/cumin/aliases.yaml.erb'),
        require => File['/etc/cumin'],
    }

    file { $ssh_config_path:
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0644',
        source => 'puppet:///modules/profile/cumin/ssh_config-unpriv',
    }
}