Puppet Class: puppet::params
- Inherited by:
-
puppet::globals
puppet::r10k::setup
puppet::server::keys
puppet::server::setup
puppet::server::bootstrap
puppet::server::bootstrap::ssh
puppet::server::bootstrap::keys
- Defined in:
- manifests/params.pp
Summary
A short summary of the purpose of this classOverview
puppet::params
A description of what this class does
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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'manifests/params.pp', line 9
class puppet::params {
include bsys::params
$tmpdir = '/tmp/puppet-puppet'
$os_version = $bsys::params::osmaj
$os_name = $bsys::params::osname
$os_namedown = downcase($os_name)
if $facts['mountpoints'] and $facts['mountpoints']['/tmp'] {
$tmp_mountpoint_noexec = ('noexec' in $facts['mountpoints']['/tmp']['options'])
}
else {
$tmp_mountpoint_noexec = false
}
case $facts['os']['family'] {
'Suse': {
$os_abbreviation = 'sles'
$version_codename = "${os_abbreviation}-${os_version}"
$package_provider = 'rpm'
$package_build = "1.sles${os_version}"
$init_config_path = '/etc/sysconfig/puppetserver'
$manage_user = false
$manage_apt = false
}
'Debian': {
$version_codename = $facts['os']['distro']['codename']
$package_provider = 'dpkg'
$package_build = "1${version_codename}"
$init_config_path = '/etc/default/puppetserver'
$manage_user = true
$user_id = undef
$group_id = undef
$user_shell = '/usr/sbin/nologin'
$manage_apt = true
}
# default is RedHat based systems
default: {
case $os_name {
'Fedora': {
$os_abbreviation = 'fedora'
$package_build = "1.fc${os_version}"
}
default: {
$os_abbreviation = 'el'
$package_build = "1.el${os_version}"
}
}
$version_codename = "${os_abbreviation}-${os_version}"
$package_provider = 'rpm'
# init config
$init_config_path = '/etc/sysconfig/puppetserver'
$manage_user = true
$user_id = 52
$group_id = 52
$user_shell = '/sbin/nologin'
$manage_apt = false
}
}
$agent_version = 'installed'
$server_version = 'installed'
$puppetdb_version = 'installed'
case $os_name {
'CentOS', 'Rocky': {
if $os_version in ['6', '7'] {
$manage_init_config = false # not implemented
$init_config_template = undef
}
else {
$manage_init_config = true
$init_config_template = 'puppet/init/puppetserver.epp'
}
}
'Ubuntu': {
$manage_init_config = true
$init_config_template = 'puppet/init/puppetserver.epp'
}
default: {
$manage_init_config = false # not implemented
$init_config_template = undef
}
}
$r10k_package_name = 'r10k'
$r10k_cachedir = '/var/cache/r10k'
$service_name = 'puppetserver'
$r10k_config_file = '/etc/puppetlabs/r10k/r10k.yaml'
$eyaml_keys_path = '/etc/puppetlabs/puppet/keys'
$eyaml_public_key = 'public_key.pkcs7.pem'
$eyaml_private_key = 'private_key.pkcs7.pem'
$puppet_sbin = '/opt/puppetlabs/bin/puppetserver'
# external_nodes
# The external node classifier (ENC) script to use for node data. Puppet
# combines this data with the main manifest to produce node catalogs.
# To enable this setting, set the node_terminus setting to exec.
# This setting’s value must be the path to an executable command that can
# produce node information. The command must:
# * Take the name of a node as a command-line argument.
# * Return a YAML hash with up to three keys:
# - classes — A list of classes, as an array or hash.
# - environment — A string.
# - parameters — A list of top-scope variables to set, as a hash.
# * For unknown nodes, exit with a non-zero exit code.
# Generally, an ENC script makes requests to an external data source.
# For more info, see the ENC documentation.
# Default: none
$external_nodes = '/usr/local/bin/puppet_node_classifier'
# https://www.puppet.com/docs/puppet/7/lang_facts_builtin_variables.html#lang_facts_builtin_variables-agent-facts
if $facts['clientcert'] {
$clientcert = $facts['clientcert']
}
else {
# fallback to fqdn
$clientcert = $facts['networking']['fqdn']
}
$r10k_vardir = "${facts['puppet_vardir']}/r10k"
}
|