Skip to content

Commit

Permalink
Merge pull request #2439 from Robnarok/main
Browse files Browse the repository at this point in the history
feat: add Debian12 Compability
  • Loading branch information
Ramesh7 authored Sep 21, 2023
2 parents ac1b7b4 + c8ab038 commit 6588929
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
'9' => '7.0', # Debian Stretch
'10' => '7.3', # Debian Buster
'11' => '7.4', # Debian Bullseye
'12' => '8.2', # Debian Bookworm
'20.04' => '7.4', # Ubuntu Foccal Fossal
'22.04' => '8.1', # Ubuntu Jammy
default => '7.2', # Ubuntu Bionic, Cosmic and Disco
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"operatingsystem": "Debian",
"operatingsystemrelease": [
"10",
"11"
"11",
"12"
]
},
{
Expand Down
4 changes: 4 additions & 0 deletions spec/acceptance/mod_php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class { 'apache::mod::php': }
describe file("#{apache_hash['mod_dir']}/php7.4.conf") do
it { is_expected.to contain 'DirectoryIndex index.php' }
end
elsif os[:family] == 'debian' && os[:release] =~ %r{^12\.}
describe file("#{apache_hash['mod_dir']}/php8.2.conf") do
it { is_expected.to contain 'DirectoryIndex index.php' }
end
elsif os[:family] == 'ubuntu' && os[:release] == '18.04'
describe file("#{apache_hash['mod_dir']}/php7.2.conf") do
it { is_expected.to contain 'DirectoryIndex index.php' }
Expand Down
11 changes: 11 additions & 0 deletions spec/classes/mod/php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@
}
end
end
when '12'
context 'on bookworm' do
it { is_expected.to contain_apache__mod('php8.2') }
it { is_expected.to contain_package('libapache2-mod-php8.2') }

it {
expect(subject).to contain_file('php8.2.load').with(
content: "LoadModule php8_module /usr/lib/apache2/modules/libphp8.2.so\n",
)
}
end
when '18.04'
context 'on bionic' do
let :params do
Expand Down

0 comments on commit 6588929

Please sign in to comment.