Skip to content

Commit

Permalink
Merge pull request #165 from notanisp/no_package_repos
Browse files Browse the repository at this point in the history
Machines which don't have internet access can't pull the repo key
  • Loading branch information
jlambert121 committed May 29, 2014
2 parents 9cbd52b + b566b13 commit 7b33ef1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions manifests/repo/apt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
} else {
$url = 'http://repos.sensuapp.org/apt'
}

if $ensure == 'present' {
apt::key { 'sensu':
key => '7580C77F',
key_source => 'http://repos.sensuapp.org/apt/pubkey.gpg',
}
}
apt::source { 'sensu':
ensure => $ensure,
location => $url,
Expand All @@ -32,11 +37,6 @@
before => Package['sensu'],
}

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

} else {
fail('This class requires puppet-apt module')
}
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/sensu_package_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
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(
it { should_not contain_apt__key('sensu').with(
:key => '7580C77F',
:key_source => 'http://repo.mydomain.com/apt/pubkey.gpg'
) }
Expand All @@ -72,7 +72,7 @@
let(:params) { { :install_repo => false, :repo => 'main' } }
it { should contain_apt__source('sensu').with_ensure('absent') }

it { should contain_apt__key('sensu').with(
it { should_not contain_apt__key('sensu').with(
:key => '7580C77F',
:key_source => 'http://repos.sensuapp.org/apt/pubkey.gpg'
) }
Expand Down

0 comments on commit 7b33ef1

Please sign in to comment.