2020-10-31 12:00:38 +00:00
|
|
|
version = node.metadata['php']['version']
|
|
|
|
|
|
|
|
files = {
|
|
|
|
f'/etc/php/{version}/fpm/php-fpm.conf': {
|
|
|
|
'source': f'{version}/fpm.conf',
|
|
|
|
'content_type': 'mako',
|
|
|
|
'context': {
|
|
|
|
'num_cpus': node.metadata['vm']['cpu'],
|
2021-12-18 17:54:00 +00:00
|
|
|
'clear_env': node.metadata.get('php/clear_env', True),
|
2020-10-31 12:00:38 +00:00
|
|
|
},
|
|
|
|
'needs': {
|
|
|
|
# "all php packages"
|
|
|
|
'pkg_apt:'
|
|
|
|
},
|
|
|
|
'triggers': {
|
|
|
|
f'svc_systemd:php{version}-fpm:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
f'/etc/php/{version}/fpm/php.ini': {
|
|
|
|
'source': f'{version}/php.ini',
|
2021-12-18 17:54:00 +00:00
|
|
|
'content_type': 'mako',
|
2020-10-31 12:00:38 +00:00
|
|
|
'context': {
|
|
|
|
'num_cpus': node.metadata['vm']['cpu'],
|
|
|
|
'post_max_size': node.metadata['php'].get('post_max_size', 10),
|
2021-12-18 17:54:00 +00:00
|
|
|
'memory_limit': node.metadata.get('php/memory_limit', 256),
|
2020-10-31 12:00:38 +00:00
|
|
|
},
|
|
|
|
'needs': {
|
|
|
|
# "all php packages"
|
|
|
|
'pkg_apt:'
|
|
|
|
},
|
|
|
|
'triggers': {
|
|
|
|
f'svc_systemd:php{version}-fpm:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
f'/etc/php/{version}/cli/php.ini': {
|
|
|
|
'source': f'{version}/php.ini',
|
2021-12-18 17:54:00 +00:00
|
|
|
'content_type': 'mako',
|
2020-10-31 12:00:38 +00:00
|
|
|
'context': {
|
|
|
|
'num_cpus': node.metadata['vm']['cpu'],
|
|
|
|
'post_max_size': node.metadata['php'].get('post_max_size', 10),
|
2021-12-18 17:54:00 +00:00
|
|
|
'memory_limit': node.metadata.get('php/memory_limit', 256),
|
2020-10-31 12:00:38 +00:00
|
|
|
},
|
|
|
|
'needs': {
|
|
|
|
# "all php packages"
|
|
|
|
'pkg_apt:'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
svc_systemd = {
|
|
|
|
f'php{version}-fpm': {
|
|
|
|
'needs': {
|
|
|
|
'pkg_apt:',
|
|
|
|
f'file:/etc/php/{version}/fpm/php-fpm.conf',
|
|
|
|
f'file:/etc/php/{version}/fpm/php.ini',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|