Skip to content

Commit

Permalink
Use $url param to build apt-key url
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
patdowney committed Apr 4, 2014
1 parent 1cc4c2a commit 308c218
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/repo/apt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

apt::key { 'sensu':
key => '7580C77F',
key_source => 'http://repos.sensuapp.org/apt/pubkey.gpg',
key_source => "${url}/pubkey.gpg",
}

} else {
Expand Down
5 changes: 5 additions & 0 deletions spec/classes/sensu_package_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
context 'override repo url' do
let(:params) { { :repo_source => 'http://repo.mydomain.com/apt' } }
it { should contain_apt__source('sensu').with( :location => 'http://repo.mydomain.com/apt') }

it { should contain_apt__key('sensu').with(
:key => '7580C77F',
:key_source => 'http://repo.mydomain.com/apt/pubkey.gpg'
) }
end

context 'install_repo => false' do
Expand Down

0 comments on commit 308c218

Please sign in to comment.