diff --git a/manifests/plugin/deb.pp b/manifests/plugin/deb.pp index d7016a23..cd5613e2 100644 --- a/manifests/plugin/deb.pp +++ b/manifests/plugin/deb.pp @@ -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 = { @@ -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, } diff --git a/metadata.json b/metadata.json index a6d2d689..ef086f8e 100644 --- a/metadata.json +++ b/metadata.json @@ -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", diff --git a/spec/classes/plugin_deb_spec.rb b/spec/classes/plugin_deb_spec.rb index eb95842d..1c070bc0 100644 --- a/spec/classes/plugin_deb_spec.rb +++ b/spec/classes/plugin_deb_spec.rb @@ -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