Skip to content

Commit 2f3eb87

Browse files
committed
apt::source: pass the weak_ssl param to apt::key
1 parent 9c34cc6 commit 2f3eb87

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

manifests/source.pp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
#
3737
# @param key
3838
# Creates a declaration of the apt::key defined type. Valid options: a string to be passed to the `id` parameter of the `apt::key`
39-
# defined type, or a hash of `parameter => value` pairs to be passed to `apt::key`'s `id`, `server`, `content`, `source`, and/or
40-
# `options` parameters.
39+
# defined type, or a hash of `parameter => value` pairs to be passed to `apt::key`'s `id`, `server`, `content`, `source`, `weak_ssl`,
40+
# and/or `options` parameters.
4141
#
4242
# @param pin
4343
# 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 @@
160160
}
161161

162162
apt::key { "Add key: ${$_key['id']} from Apt::Source ${title}":
163-
ensure => $_ensure,
164-
id => $_key['id'],
165-
server => $_key['server'],
166-
content => $_key['content'],
167-
source => $_key['source'],
168-
options => $_key['options'],
169-
before => $_before,
163+
ensure => $_ensure,
164+
id => $_key['id'],
165+
server => $_key['server'],
166+
content => $_key['content'],
167+
source => $_key['source'],
168+
options => $_key['options'],
169+
weak_ssl => $_key['weak_ssl'],
170+
before => $_before,
170171
}
171172
}
172173
}

spec/defines/source_spec.rb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,14 @@
109109
location: 'http://debian.mirror.iweb.ca/debian/',
110110
release: 'sid',
111111
repos: 'testing',
112-
key: { 'ensure' => 'refreshed',
113-
'id' => GPG_KEY_ID,
114-
'server' => 'pgp.mit.edu',
115-
'content' => 'GPG key content',
116-
'source' => 'http://apt.puppetlabs.com/pubkey.gpg' },
112+
key: {
113+
'ensure' => 'refreshed',
114+
'id' => GPG_KEY_ID,
115+
'server' => 'pgp.mit.edu',
116+
'content' => 'GPG key content',
117+
'source' => 'http://apt.puppetlabs.com/pubkey.gpg',
118+
'weak_ssl' => true,
119+
},
117120
pin: '10',
118121
architecture: 'x86_64',
119122
allow_unsigned: true,
@@ -136,7 +139,8 @@
136139
id: GPG_KEY_ID,
137140
server: 'pgp.mit.edu',
138141
content: 'GPG key content',
139-
source: 'http://apt.puppetlabs.com/pubkey.gpg')
142+
source: 'http://apt.puppetlabs.com/pubkey.gpg',
143+
weak_ssl: true)
140144
}
141145
end
142146
end

0 commit comments

Comments
 (0)