Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #56 from zxjinn/zxjinn/apt-2
Browse files Browse the repository at this point in the history
Update apt::source to use puppetlabs-apt 2.0.0+
  • Loading branch information
solarkennedy committed Oct 20, 2015
2 parents 564f039 + 2490a40 commit e973406
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
21 changes: 13 additions & 8 deletions manifests/repo/apt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@
}

apt::source { 'sensu':
ensure => $ensure,
location => $url,
release => 'sensu',
repos => $uchiwa::repo,
include_src => false,
key => $uchiwa::repo_key_id,
key_source => $uchiwa::repo_key_source,
before => Package['uchiwa'],
ensure => $ensure,
before => Package['uchiwa'],
include => {
'src' => false,
'deb' => true,
},
key => {
'id' => $uchiwa::repo_key_id,
'source' => $uchiwa::repo_key_source,
},
location => $url,
release => 'sensu',
repos => $uchiwa::repo,
}

} else {
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"issues_url": "https://github.com/yelp/puppet-uchiwa/issues",
"description": "Puppet module for installing Uchiwa",
"dependencies": [
{"name":"puppetlabs/apt","version_requirement": ">=1.4.0 <2.0.0"},
{"name":"puppetlabs/apt","version_requirement": ">=2.0.0 <3.0.0"},
{"name":"puppetlabs/stdlib"}
]
}
17 changes: 8 additions & 9 deletions spec/classes/uchiwa_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,17 @@
}

context 'with puppet-apt installed' do
let(:pre_condition) { [ 'define apt::source ($ensure, $location, $release, $repos, $include_src, $key, $key_source) {}' ] }
let(:pre_condition) { [ 'define apt::source ($ensure, $location, $release, $repos, $include, $key) {}' ] }

context 'default' do
it { should contain_apt__source('sensu').with(
:ensure => 'present',
:location => 'http://repos.sensuapp.org/apt',
:release => 'sensu',
:repos => 'main',
:include_src => false,
:key => '8911D8FF37778F24B4E726A218609E3D7580C77F',
:key_source => 'http://repos.sensuapp.org/apt/pubkey.gpg',
:before => 'Package[uchiwa]'
:ensure => 'present',
:location => 'http://repos.sensuapp.org/apt',
:release => 'sensu',
:repos => 'main',
:include => { 'src' => false, 'deb' => true },
:key => { 'id' => '8911D8FF37778F24B4E726A218609E3D7580C77F', 'source' => 'http://repos.sensuapp.org/apt/pubkey.gpg' },
:before => 'Package[uchiwa]'
) }
end

Expand Down

0 comments on commit e973406

Please sign in to comment.