2020-10-31 12:00:38 +00:00
|
|
|
defaults = {
|
|
|
|
'apt': {
|
|
|
|
'repos': {
|
|
|
|
'php': {
|
|
|
|
'items': {
|
|
|
|
'deb https://packages.sury.org/php/ {os_release} main',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-01-07 17:44:38 +00:00
|
|
|
@metadata_reactor.provides(
|
|
|
|
'apt/packages',
|
|
|
|
)
|
2020-10-31 12:00:38 +00:00
|
|
|
def php_packages_with_features(metadata):
|
|
|
|
version = metadata.get('php/version')
|
|
|
|
|
|
|
|
packages = {
|
2020-11-11 07:37:29 +00:00
|
|
|
f'php{version}': {},
|
|
|
|
f'php{version}-cli': {},
|
|
|
|
f'php{version}-fpm': {},
|
2020-10-31 12:00:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for package in metadata.get('php/packages', set()):
|
|
|
|
packages[f'php{version}-{package}'] = {
|
|
|
|
'triggers': {
|
|
|
|
f'svc_systemd:php{version}-fpm:restart',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
'apt': {
|
|
|
|
'packages': packages,
|
|
|
|
},
|
|
|
|
}
|