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