From d261b5ee19adce3457079ea89de6695520d68d92 Mon Sep 17 00:00:00 2001 From: Terry Spotts Date: Fri, 26 Apr 2024 11:09:34 -0400 Subject: [PATCH] BOR-513: Improve fb_apt_keys for Ubuntu support --- cookbooks/fb_apt/resources/keys.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbooks/fb_apt/resources/keys.rb b/cookbooks/fb_apt/resources/keys.rb index b4cfccbf5..e4d3041e7 100644 --- a/cookbooks/fb_apt/resources/keys.rb +++ b/cookbooks/fb_apt/resources/keys.rb @@ -51,7 +51,8 @@ Chef::Log.debug("fb_apt[keys]: Processing new keyid #{keyid}") if key execute "add key for #{keyid} to APT" do - command "echo '#{key}' | apt-key add -" + command "echo '#{key}' | gpg --batch --dearmor -o /etc/apt/keyrings/#{keyid}.gpg" + creates "/etc/apt/keyrings/#{keyid}.gpg" end elsif keyserver execute "fetch and add key for keyid #{keyid} to APT" do