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

Fixes #35496 - Add default pulp_deb config #263

Merged
merged 1 commit into from
Oct 28, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion manifests/plugin/deb.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# @summary Pulp Deb plugin
# @param use_pulp2_content_route Whether to redirect the legacy (Pulp 2) URL, /pulp/deb/, to the content server
# @param use_pulp2_content_route
# Whether to redirect the legacy (Pulp 2) URL, /pulp/deb/, to the content server
# @param force_ignore_missing_package_indices
# Wheter to set the FORCE_IGNORE_MISSING_PACKAGE_INDICES setting to True or
# False in /etc/pulp/settings.py.
class pulpcore::plugin::deb (
Boolean $use_pulp2_content_route = false,
Boolean $force_ignore_missing_package_indices = true,
) {
if $use_pulp2_content_route {
$context = {
Expand All @@ -27,7 +32,10 @@
$content = undef
}

$deb_plugin_config_fimpi = to_python($force_ignore_missing_package_indices)

pulpcore::plugin { 'deb':
config => "FORCE_IGNORE_MISSING_PACKAGE_INDICES = ${deb_plugin_config_fimpi}",
http_content => $content,
https_content => $content,
}
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.25.0 < 9.0.0"
"version_requirement": ">= 8.3.0 < 9.0.0"
},
{
"name": "puppet/redis",
Expand Down
10 changes: 10 additions & 0 deletions spec/classes/plugin_deb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
is_expected.to contain_pulpcore__plugin('deb')
.that_subscribes_to('Class[Pulpcore::Install]')
.that_notifies(['Class[Pulpcore::Database]', 'Class[Pulpcore::Service]'])
.with_config('FORCE_IGNORE_MISSING_PACKAGE_INDICES = True')
end

context 'with force ignore missing set' do
let(:params) { { force_ignore_missing_package_indices: false } }

it do
is_expected.to contain_pulpcore__plugin('deb')
.with_config('FORCE_IGNORE_MISSING_PACKAGE_INDICES = False')
end
end

context 'with pulp2 content route' do
Expand Down