Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datadog gpg #918

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions recipes/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,15 @@ def warn_deprecated_yumrepo_gpgkey
Chef::Log.error("agent_major_version '#{agent_major_version}' not supported.")
end


apt_gpg_keys.each do |key|
key_short = key[-8..-1] # last 8 chars, since some versions of apt-key add dashes between key sections
execute "apt-key import key #{key_short}" do
command "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 #{key}"
not_if "apt-key adv --list-public-keys --with-fingerprint --with-colons | grep #{key_short} | grep pub"
end
end

retries = node['datadog']['aptrepo_retries']

# Add APT repositories
Expand Down