Puppet Class: lsys::params
- Inherited by:
-
lsys::cron
lsys::monit
lsys::nginx
lsys::postgres
lsys::monit::service
lsys::postfix::client
lsys::repo::powertools
lsys::logrotate::default
lsys::monit::prebuilt_binary
- Defined in:
- manifests/params.pp
Summary
Local system parametersOverview
Local system parameters
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 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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'manifests/params.pp', line 7
class lsys::params {
include nginx::params
include lsys::webserver::params
# nginx
$nginx_libdir = '/var/lib/nginx'
$nginx_cachedir = '/var/cache/nginx'
$nginx_proxy_temp_path = "${nginx_cachedir}/proxy_temp"
$nginx_user_home = '/var/lib/nginx'
$osfam = $facts['os']['family']
$osname = $facts['os']['name']
$osmaj = $facts['os']['release']['major']
case $osname {
'Ubuntu': {
$oscode = $facts['os']['distro']['codename']
$nginx_version = "1.23.1-1~${oscode}"
$syslog_default = '/var/log/syslog'
$logrotate_syslog_name = 'rsyslog'
$logrotate_postrotate = '/usr/lib/rsyslog/rsyslog-rotate'
$logrotate_default_config = {
'rotate' => 7,
'daily' => true,
'missingok' => true,
'ifempty' => false,
'delaycompress' => true,
'compress' => true,
'postrotate' => $logrotate_postrotate,
}
$logrotate_syslog_path = [
'/var/log/mail.info',
'/var/log/mail.warn',
'/var/log/mail.err',
'/var/log/mail.log',
'/var/log/daemon.log',
'/var/log/kern.log',
'/var/log/auth.log',
'/var/log/user.log',
'/var/log/lpr.log',
'/var/log/cron.log',
'/var/log/debug',
'/var/log/messages',
]
$logrotate_syslog_config = {
'rotate' => 7,
'weekly' => true,
'missingok' => true,
'ifempty' => false,
'delaycompress' => true,
'compress' => true,
'sharedscripts' => true,
'postrotate' => $logrotate_postrotate,
}
$logrotate_main_config = {
create => true,
# keep 4 weeks worth of backlogs
rotate => 4,
# rotate log files weekly
rotate_every => 'week',
su => true,
su_user => 'root',
su_group => 'adm',
}
$postfix_uid = undef
$postfix_gid = undef
$postfix_shell = '/usr/sbin/nologin'
$postdrop_gid = undef
$cron_package_name = 'cron'
$centos_stream = false
$postgres_version = '15.4'
$postgres_manage_repo = true
$postfix_master_os_template = undef
}
'CentOS', 'Rocky': {
$nginx_version = $osmaj ? {
'6' => '1.19.5-1.el6.ngx',
default => "1.23.1-1.el${osmaj}.ngx",
}
$syslog_default = '/var/log/messages'
$logrotate_syslog_name = 'syslog'
$logrotate_postrotate = '/usr/bin/systemctl kill -s HUP rsyslog.service >/dev/null 2>&1 || true'
$logrotate_default_config = {
'missingok' => true,
'sharedscripts' => true,
'postrotate' => $logrotate_postrotate,
}
$logrotate_syslog_path = [
'/var/log/cron',
'/var/log/maillog',
'/var/log/messages',
'/var/log/secure',
'/var/log/spooler',
]
$logrotate_syslog_config = $logrotate_default_config
$logrotate_main_config = {
dateext => true,
compress => true,
create => true,
rotate => 4,
rotate_every => 'week',
}
$postfix_uid = 89
$postfix_gid = 89
$postfix_shell = '/sbin/nologin'
$postdrop_gid = 90
$cron_package_name = $osmaj ? {
'5' => 'vixie-cron',
default => 'cronie',
}
if $osname == 'CentOS' {
# Puppet > 6
if 'distro' in $facts['os'] {
# centos stream
$centos_stream = $osmaj ? {
'6' => false,
'7' => false,
'9' => true,
default => $facts['os']['distro']['id'] ? {
'CentOSStream' => true,
default => false,
},
}
}
else {
$centos_stream = $facts['os']['release']['full'] ? {
# for CentOS Stream 8 it is just '8' but for CentOS Linux 8 it is 8.x.x
'8' => true,
'9' => true,
default => false,
}
}
$repo_gpgkey = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial'
if $centos_stream {
$repo_powertools_mirrorlist = 'http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=PowerTools&infra=$infra'
$repo_os_name = 'CentOS Stream'
}
else {
$repo_powertools_mirrorlist = 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra'
$repo_os_name = 'CentOS Linux'
}
}
else {
$centos_stream = false
$repo_gpgkey = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial'
$repo_powertools_mirrorlist = 'https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=PowerTools-$releasever'
$repo_os_name = 'Rocky Linux'
}
if $osname == 'CentOS' and $centos_stream {
$postgres_version = $osmaj ? {
'8' => '15.0',
default => '15.2',
}
$postgres_manage_repo = false
}
elsif $osname == 'Rocky' {
$postgres_version = $osmaj ? {
'8' => '15.2',
default => '15.3',
}
$postgres_manage_repo = false
}
else {
$postgres_version = '15.4'
$postgres_manage_repo = true
}
if $osname == 'Rocky' and $osmaj == '8' {
$postfix_master_os_template = 'lsys/postfix/master.cf.rocky-8.erb'
}
else {
$postfix_master_os_template = undef
}
}
}
$nginx_conf_dir = $nginx::params::conf_dir
# directory to store configuration snippets to include into map directive
$nginx_map_dir = "${nginx_conf_dir}/conf.d/mapping"
# monit
$monit_version = '5.33.0'
$monit_binary_path = '/usr/local/bin/monit'
$monit_config_dir = '/etc/monit.d'
$monit_config_file = '/etc/monitrc'
$monit_logfile = '/var/log/monit.log'
$monit_pid_file = '/var/run/monit.pid'
}
|