diff --git a/manifests/globals.pp b/manifests/globals.pp index 2f729703..9fcd4ea8 100644 --- a/manifests/globals.pp +++ b/manifests/globals.pp @@ -42,6 +42,7 @@ '18.04' => '7.2', '20.04' => '7.4', '22.04' => '8.1', + '24.04' => '8.3', default => fail("Unsupported Ubuntu release: ${fact('os.release.major')}"), }, default => '5.x', diff --git a/metadata.json b/metadata.json index d8facfc4..f7e97522 100644 --- a/metadata.json +++ b/metadata.json @@ -41,7 +41,8 @@ "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "20.04", - "22.04" + "22.04", + "24.04" ] }, { diff --git a/spec/acceptance/php_spec.rb b/spec/acceptance/php_spec.rb index 07bc278b..3e118696 100644 --- a/spec/acceptance/php_spec.rb +++ b/spec/acceptance/php_spec.rb @@ -16,6 +16,8 @@ 'php7.4-fpm' when %r{ubuntu-22.04} 'php8.1-fpm' + when %r{ubuntu-24.04} + 'php8.3-fpm' when %r{ubuntu-18.04} 'php7.2-fpm' when %r{debian-10} @@ -37,9 +39,11 @@ context 'default parameters with extensions' do case default[:platform] - when %r{ubuntu-22.04}, %r{ubuntu-20.04}, %r{ubuntu-18.04} + when %r{ubuntu-24.04}, %r{ubuntu-22.04}, %r{ubuntu-20.04}, %r{ubuntu-18.04} it 'works with defaults' do case default[:platform] + when %r{ubuntu-24.04} + simplexmlpackagename = 'php8.3-xml' when %r{ubuntu-22.04} simplexmlpackagename = 'php8.1-xml' when %r{ubuntu-20.04} @@ -86,6 +90,8 @@ 'php7.4-fpm' when %r{ubuntu-22.04} 'php8.1-fpm' + when %r{ubuntu-24.04} + 'php8.3-fpm' when %r{ubuntu-18.04} 'php7.2-fpm' when %r{debian-10} diff --git a/spec/classes/php_fpm_service_spec.rb b/spec/classes/php_fpm_service_spec.rb index 39df3cee..c148e8a8 100644 --- a/spec/classes/php_fpm_service_spec.rb +++ b/spec/classes/php_fpm_service_spec.rb @@ -34,6 +34,8 @@ it { is_expected.to contain_service('php7.2-fpm').with_ensure('running') } when '22.04' it { is_expected.to contain_service('php8.1-fpm').with_ensure('running') } + when '24.04' + it { is_expected.to contain_service('php8.3-fpm').with_ensure('running') } when '10' it { is_expected.to contain_service('php7.3-fpm').with_ensure('running') } when '20.04', '11' diff --git a/spec/classes/php_fpm_spec.rb b/spec/classes/php_fpm_spec.rb index 04d13e43..a73cb8ce 100644 --- a/spec/classes/php_fpm_spec.rb +++ b/spec/classes/php_fpm_spec.rb @@ -25,6 +25,9 @@ when '22.04' it { is_expected.to contain_package('php8.1-fpm').with_ensure('present') } it { is_expected.to contain_service('php8.1-fpm').with_ensure('running') } + when '24.04' + it { is_expected.to contain_package('php8.3-fpm').with_ensure('present') } + it { is_expected.to contain_service('php8.3-fpm').with_ensure('running') } when '20.04', '11' it { is_expected.to contain_package('php7.4-fpm').with_ensure('present') } it { is_expected.to contain_service('php7.4-fpm').with_ensure('running') } diff --git a/spec/classes/php_spec.rb b/spec/classes/php_spec.rb index 4dfed58f..53acfe8e 100644 --- a/spec/classes/php_spec.rb +++ b/spec/classes/php_spec.rb @@ -23,6 +23,8 @@ end when 'Ubuntu' case facts[:os]['release']['major'] + when '24.04' + 'php8.3-cli' when '22.04' 'php8.1-cli' when '20.04' @@ -47,6 +49,8 @@ end when 'Ubuntu' case facts[:os]['release']['major'] + when '24.04' + 'php8.3-fpm' when '22.04' 'php8.1-fpm' when '20.04' @@ -71,6 +75,8 @@ end when 'Ubuntu' case facts[:os]['release']['major'] + when '24.04' + 'php8.3-dev' when '22.04' 'php8.1-dev' when '20.04' @@ -195,6 +201,8 @@ end when 'Ubuntu' case facts[:os]['release']['major'] + when '24.04' + '/etc/php/8.3/fpm/pool.d/www.conf' when '22.04' '/etc/php/8.1/fpm/pool.d/www.conf' when '20.04' @@ -240,6 +248,8 @@ end when 'Ubuntu' case facts[:os]['release']['major'] + when '24.04' + '/etc/php/8.3/fpm/pool.d/www.conf' when '22.04' '/etc/php/8.1/fpm/pool.d/www.conf' when '20.04' @@ -292,6 +302,8 @@ end when 'Ubuntu' case facts[:os]['release']['major'] + when '24.04' + '/etc/php/8.3/fpm/pool.d/www.conf' when '22.04' '/etc/php/8.1/fpm/pool.d/www.conf' when '20.04' diff --git a/spec/defines/extension_spec.rb b/spec/defines/extension_spec.rb index 28ecf6d1..dfeaa428 100644 --- a/spec/defines/extension_spec.rb +++ b/spec/defines/extension_spec.rb @@ -25,6 +25,8 @@ end when 'Ubuntu' case facts[:os]['release']['major'] + when '24.04' + '/etc/php/8.3/mods-available' when '22.04' '/etc/php/8.1/mods-available' when '20.04' diff --git a/spec/defines/fpm_pool_spec.rb b/spec/defines/fpm_pool_spec.rb index ec0226f4..705abf52 100644 --- a/spec/defines/fpm_pool_spec.rb +++ b/spec/defines/fpm_pool_spec.rb @@ -33,6 +33,8 @@ let(:params) { {} } case facts[:os]['release']['major'] + when '24.04' + it { is_expected.to contain_file('/etc/php/8.3/fpm/pool.d/unique-name.conf') } when '22.04' it { is_expected.to contain_file('/etc/php/8.1/fpm/pool.d/unique-name.conf') } when '20.04'