Initial commit

This commit is contained in:
Léo Berry
2025-10-28 14:35:40 +01:00
commit 78da6b2994
11 changed files with 463 additions and 0 deletions

36
manifests/install.pp Normal file
View File

@@ -0,0 +1,36 @@
# modules/frankenphp/manifests/install.pp
class frankenphp::install (
$version = $frankenphp::params::version,
$package_name = $frankenphp::params::package_name,
$download_url = $frankenphp::params::download_url,
$local_deb_path = $frankenphp::params::local_deb_path,
) inherits frankenphp::params {
if ! defined(Package['wget']) {
package { 'wget':
ensure => installed,
}
}
exec { "download-frankenphp-${version}":
command => "/usr/bin/wget -q '${download_url}' -O '${local_deb_path}'",
creates => $local_deb_path,
path => ['/usr/bin', '/bin'],
require => Package['wget'],
}
package { $package_name:
ensure => 'installed',
provider => 'dpkg',
source => $local_deb_path,
require => Exec["download-frankenphp-${version}"],
notify => Exec["cleanup-frankenphp-deb-${version}"],
}
exec { "cleanup-frankenphp-deb-${version}":
command => "/bin/rm -f '${local_deb_path}'",
path => ['/bin'],
refreshonly => true,
}
}