Puppet Class: role::simplelamp2
- Defined in:
- modules/role/manifests/simplelamp2.pp
Overview
class: role::simplelamp2
Sets up a simple LAMP server for use by arbitrary php applications
httpd (“apache”), memcached, PHP, MariaDB
As opposed to the original simplelamp role it uses MariaDB instead of MySQL and the httpd instead of the apache module.
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 |
# File 'modules/role/manifests/simplelamp2.pp', line 10
class role::simplelamp2 {
system::role { 'simplelamp2':
ensure => 'present',
description => 'httpd, memcached, PHP, mariadb',
}
$apache_modules_common = ['rewrite', 'headers']
ensure_packages('libapache2-mod-php')
# TODO: another use case for php_version fact
$apache_php_module = debian::codename() ? {
'stretch' => 'php7.0',
'buster' => 'php7.3',
'bullseye' => 'php7.4',
default => fail("unsupported on ${debian::codename()}"),
}
$apache_modules = concat($apache_modules_common, $apache_php_module)
class { 'httpd::mpm':
mpm => 'prefork',
}
class { 'httpd':
modules => $apache_modules,
purge_manual_config => false,
require => Class['httpd::mpm'],
}
class { 'memcached':
# TODO: the following were implicit defaults from
# MW settings, need to be reviewed.
growth_factor => 1.05,
min_slab_size => 5,
}
include profile::mariadb::generic_server
}
|