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

Updating APT source to use new apt module version #45

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$install_repo = true
$repo = 'main'
$repo_source = undef
$repo_key_id = '7580C77F'
$repo_key_id = '8911D8FF37778F24B4E726A218609E3D7580C77F'
$repo_key_source = 'http://repos.sensuapp.org/apt/pubkey.gpg'
$manage_services = true
$manage_user = true
Expand Down
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,
location => $url,
release => 'sensu',
repos => $uchiwa::repo,
key => {
'id' => $uchiwa::repo_key_id,
'source' => $uchiwa::repo_key_source,
},
include => {
'src' => false,
'deb' => true,
},
before => Package['uchiwa'],
}

} else {
Expand Down
9 changes: 4 additions & 5 deletions spec/classes/uchiwa_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,16 @@
}

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 => '7580C77F',
:key_source => 'http://repos.sensuapp.org/apt/pubkey.gpg',
:include => { 'src' => false, 'deb' => true },
:key => { 'id' => '8911D8FF37778F24B4E726A218609E3D7580C77F', 'source' => 'http://repos.sensuapp.org/apt/pubkey.gpg' },
:before => 'Package[uchiwa]'
) }
end
Expand Down Expand Up @@ -144,4 +143,4 @@

end

end
end