Skip to content

Commit

Permalink
use key from our server, not the gpg network
Browse files Browse the repository at this point in the history
also ensure the key is refreshed if expired
  • Loading branch information
evgeni committed Mar 23, 2021
1 parent 79455a4 commit edce219
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions manifests/repos/apt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,34 @@
# @api private
define foreman::repos::apt (
Variant[Enum['nightly'], Pattern['^\d+\.\d+$']] $repo,
Variant[String, Hash] $key = 'AE0AF310E2EA96B6B6F4BD726F8600B9563278F6',
String $key = 'AE0AF310E2EA96B6B6F4BD726F8600B9563278F6',
Stdlib::HTTPUrl $key_location = 'https://deb.theforeman.org/foreman.asc',
Stdlib::HTTPUrl $location = 'https://deb.theforeman.org/',
) {
include apt

::apt::source { $name:
apt::key { $name:
ensure => refreshed,
id => $key,
source => $key_location,
}

apt::source { $name:
repos => $repo,
location => $location,
key => $key,
include => {
src => false,
},
require => Apt::Key['foreman'],
}

::apt::source { "${name}-plugins":
apt::source { "${name}-plugins":
release => 'plugins',
repos => $repo,
location => $location,
key => $key,
include => {
src => false,
},
require => Apt::Key['foreman'],
}
}
2 changes: 1 addition & 1 deletion spec/defines/foreman_repos_apt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
end

let(:apt_key_title) do
"Add key: #{apt_key} from Apt::Source foreman"
"foreman"
end

context 'with repo => 1.18' do
Expand Down

0 comments on commit edce219

Please sign in to comment.