Skip to content

Commit 308c218

Browse files
committed
Use $url param to build apt-key url
When using a mirror of sensu I want to also use the mirror to retrieve the repo's apt-key, particularly if there's no internet available.
1 parent 1cc4c2a commit 308c218

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

manifests/repo/apt.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
apt::key { 'sensu':
3636
key => '7580C77F',
37-
key_source => 'http://repos.sensuapp.org/apt/pubkey.gpg',
37+
key_source => "${url}/pubkey.gpg",
3838
}
3939

4040
} else {

spec/classes/sensu_package_spec.rb

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
context 'override repo url' do
6262
let(:params) { { :repo_source => 'http://repo.mydomain.com/apt' } }
6363
it { should contain_apt__source('sensu').with( :location => 'http://repo.mydomain.com/apt') }
64+
65+
it { should contain_apt__key('sensu').with(
66+
:key => '7580C77F',
67+
:key_source => 'http://repo.mydomain.com/apt/pubkey.gpg'
68+
) }
6469
end
6570

6671
context 'install_repo => false' do

0 commit comments

Comments
 (0)