From: Kenyon Ralph Date: Wed, 21 Jul 2021 19:59:20 +0000 (-0700) Subject: apt::source: pass the weak_ssl param to apt::key X-Git-Tag: v8.1.0~2^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2f3eb87fb359d18d65810eb7def0e341d9cd6c84;hp=9c34cc60a861f1fdc58243b44078d52c22c46595;p=puppet-modules%2Fpuppetlabs-apt.git apt::source: pass the weak_ssl param to apt::key --- diff --git a/manifests/source.pp b/manifests/source.pp index 57c210f..ccc87c3 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -36,8 +36,8 @@ # # @param key # Creates a declaration of the apt::key defined type. Valid options: a string to be passed to the `id` parameter of the `apt::key` -# defined type, or a hash of `parameter => value` pairs to be passed to `apt::key`'s `id`, `server`, `content`, `source`, and/or -# `options` parameters. +# defined type, or a hash of `parameter => value` pairs to be passed to `apt::key`'s `id`, `server`, `content`, `source`, `weak_ssl`, +# and/or `options` parameters. # # @param pin # Creates a declaration of the apt::pin defined type. Valid options: a number or string to be passed to the `id` parameter of the @@ -160,13 +160,14 @@ define apt::source( } apt::key { "Add key: ${$_key['id']} from Apt::Source ${title}": - ensure => $_ensure, - id => $_key['id'], - server => $_key['server'], - content => $_key['content'], - source => $_key['source'], - options => $_key['options'], - before => $_before, + ensure => $_ensure, + id => $_key['id'], + server => $_key['server'], + content => $_key['content'], + source => $_key['source'], + options => $_key['options'], + weak_ssl => $_key['weak_ssl'], + before => $_before, } } } diff --git a/spec/defines/source_spec.rb b/spec/defines/source_spec.rb index 94446bf..fa443b8 100644 --- a/spec/defines/source_spec.rb +++ b/spec/defines/source_spec.rb @@ -109,11 +109,14 @@ describe 'apt::source' do location: 'http://debian.mirror.iweb.ca/debian/', release: 'sid', repos: 'testing', - key: { 'ensure' => 'refreshed', - 'id' => GPG_KEY_ID, - 'server' => 'pgp.mit.edu', - 'content' => 'GPG key content', - 'source' => 'http://apt.puppetlabs.com/pubkey.gpg' }, + key: { + 'ensure' => 'refreshed', + 'id' => GPG_KEY_ID, + 'server' => 'pgp.mit.edu', + 'content' => 'GPG key content', + 'source' => 'http://apt.puppetlabs.com/pubkey.gpg', + 'weak_ssl' => true, + }, pin: '10', architecture: 'x86_64', allow_unsigned: true, @@ -136,7 +139,8 @@ describe 'apt::source' do id: GPG_KEY_ID, server: 'pgp.mit.edu', content: 'GPG key content', - source: 'http://apt.puppetlabs.com/pubkey.gpg') + source: 'http://apt.puppetlabs.com/pubkey.gpg', + weak_ssl: true) } end end