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

(PA-5337) PE integration #654

Merged
merged 1 commit into from
May 15, 2023
Merged
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
6 changes: 5 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@
$collection = 'puppet6'
}
# pe_version >= 2021.0, use puppet7
else {
elsif versioncmp($_pe_version, '2023.3') < 0 {
$collection = 'puppet7'
}
# pe_version >= 2023.3, use puppet8
else {
$collection = 'puppet8'
}
# The aio puppet-agent version currently installed on the compiling master
# (only used in PE)
if is_function_available('pe_compiling_server_aio_build') {
Expand Down
12 changes: 12 additions & 0 deletions spec/classes/puppet_agent_params_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,17 @@ def sets_collection_to(collection)

it { sets_collection_to('puppet7') }
end

context '2023.3 > pe_version >= 2023.0' do
let(:facts) { super().merge(custom_fact__pe_version: '2023.0') }

it { sets_collection_to('puppet7') }
end

context 'pe_version >= 2023.3' do
let(:facts) { super().merge(custom_fact__pe_version: '2023.3') }

it { sets_collection_to('puppet8') }
end
end
end