Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Ubuntu 24.04 #727

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions manifests/globals.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system Debian 10

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system RedHat 7

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system CentOS 7

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system FreeBSD 11
"name": "puppet-php",
"version": "10.2.1-rc0",
"author": "Vox Pupuli",
Expand Down Expand Up @@ -41,7 +41,8 @@
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"20.04",
"22.04"
"22.04",
"24.04"
]
},
{
Expand Down
8 changes: 7 additions & 1 deletion spec/acceptance/php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions spec/classes/php_fpm_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 3 additions & 0 deletions spec/classes/php_fpm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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') }
Expand Down
12 changes: 12 additions & 0 deletions spec/classes/php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions spec/defines/extension_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions spec/defines/fpm_pool_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down