Skip to content
Closed
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
16 changes: 16 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,22 @@
},
}
}
'12': {
$java = {
'jdk' => {
'package' => 'openjdk-17-jdk',
'alternative' => "java-1.17.0-openjdk-${openjdk_architecture}",
'alternative_path' => "/usr/lib/jvm/java-1.17.0-openjdk-${openjdk_architecture}/bin/java",
'java_home' => "/usr/lib/jvm/java-1.17.0-openjdk-${openjdk_architecture}/",
},
'jre' => {
'package' => 'openjdk-17-jre-headless',
'alternative' => "java-1.17.0-openjdk-${openjdk_architecture}",
'alternative_path' => "/usr/lib/jvm/java-1.17.0-openjdk-${openjdk_architecture}/bin/java",
'java_home' => "/usr/lib/jvm/java-1.17.0-openjdk-${openjdk_architecture}/",
},
}
}
'10', '11', '18.04', '18.10', '19.04', '19.10', '20.04', '22.04': {
$java = {
'jdk' => {
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"operatingsystem": "Debian",
"operatingsystemrelease": [
"10",
"11"
"11",
"12"
]
},
{
Expand Down
8 changes: 8 additions & 0 deletions spec/classes/java_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') }
end

context 'when selecting jre for Debian Bookworm (12.0)' do
let(:facts) { { os: { family: 'Debian', name: 'Debian', lsb: { distcodename: 'bookworm' }, release: { major: '12' }, architecture: 'amd64' } } }
let(:params) { { 'distribution' => 'jre' } }

it { is_expected.to contain_package('java').with_name('openjdk-17-jre-headless') }
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.17.0-openjdk-amd64/') }
end

context 'when selecting jdk for Ubuntu Bionic (18.04)' do
let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'bionic' }, release: { major: '18.04' }, architecture: 'amd64' } } }
let(:params) { { 'distribution' => 'jdk' } }
Expand Down