Puppet Class: profile::puppet_compiler

Defined in:
modules/profile/manifests/puppet_compiler.pp

Overview

Parameters:

  • cloud_puppetmaster (Any) (defaults to: hiera('profile::puppet_compiler::cloud_puppetmaster'))


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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'modules/profile/manifests/puppet_compiler.pp', line 1

class profile::puppet_compiler(
    $cloud_puppetmaster = hiera('profile::puppet_compiler::cloud_puppetmaster')
) {

    case $::realm {
        'labs'      : {
            # lint:ignore:wmf_styleguide
            require profile::ci::slave::labs::common
            # lint:endignore

            ferm::service {'puppet_compiler_web':
                ensure => 'present',
                proto  => 'tcp',
                port   => 'http',
                prio   => '30',
                srange => '$LABS_NETWORKS'
            }

            # delete output files older than a month (T222072)
            $output_dir = '/srv/jenkins-workspace/puppet-compiler/output'
            cron { 'delete-old-output-files':
                ensure   => 'present',
                command  => "find ${output_dir} -ctime +31 -delete",
                user     => 'root',
                monthday => '1',
                hour     => '1',
                minute   => '30',
            }
        }
        default     : { fail("Realm ${::realm} NOT supported by this role.") }
    }

    include ::puppet_compiler
    include ::profile::puppet_compiler::postgres_database

    # Conftool + etcd are needed for the conftool function to work
    # do not bother with hiera here, for now.
    class { '::profile::conftool::client':
        srv_domain => 'puppet-diffs.eqiad.wmflabs',
        host       => '127.0.0.1',
        port       => 2379,
        namespace  => dirname('/conftool/v1'),
    }

    class {'::openstack::puppet::master::enc':
        puppetmaster => $cloud_puppetmaster,
    }
}