Puppet Class: profile::base::production
- Defined in:
- modules/profile/manifests/base/production.pp
Summary
install production specific classesOverview
SPDX-License-Identifier: Apache-2.0
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 |
# File 'modules/profile/manifests/base/production.pp', line 7
class profile::base::production (
Boolean $enable = lookup('profile::base::production::enable'),
Boolean $enable_ip6_mapped = lookup('profile::base::production::enable_ip6_mapped'),
Optional[String[1]] $role_description = lookup('profile::base::production::role_description')
) {
if $enable {
# include this early so we can use the data elsewhere
include profile::netbox::host
include profile::base
# Contain the profile::admin module so we create all the required groups before
# something else creates a system group with one of our GID's
# e.g. ::profile::debmonitor::client
contain profile::admin
include profile::pki::client
# profile::base::certificates provides the ca file used by the pki client
Class['profile::base::certificates'] -> Class['profile::pki::client']
include profile::contacts
include profile::base::netbase
include profile::logoutd
include profile::cumin::target
include profile::debmonitor::client
class { 'base::phaste': }
class { 'base::screenconfig': }
if debian::codename::le('buster') {
class { 'toil::acct_handle_wtmp_not_rotated': }
}
include profile::monitoring
include profile::rsyslog::kafka_shipper
include profile::emacs
if $enable_ip6_mapped {
interface::add_ip6_mapped { 'main': }
}
if $facts['has_ipmi'] {
class { 'prometheus::ipmi_exporter': }
}
if $facts['is_virtual'] {
class { 'toil::ganeti_ifupdown': }
}
$role_str = $::_role.regsubst('\/', '::', 'G') # lint:ignore:top_scope_facts
$message = $role_description ? {
undef => "${facts['networking']['hostname']} is ${role_str}",
default => "${facts['networking']['hostname']} is a ${role_description} (${role_str})",
}
motd::message { $role_str:
priority => 5,
message => $message,
}
}
}
|