ansible.builtin.apt_key module doesn't work with binary gpg keys in ansible v4.0.0 #74770
Closed
1 task done
Labels
affects_2.12
bug
This issue/PR relates to a bug.
module
This issue/PR relates to a module.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
Summary
Using
ansible.builtin.apt_key
to import a binary gpg key started failing with release of ansible 4.0.0. It works well on other versions of ansible 2.9+.Issue Type
Bug Report
Component Name
apt_key
Ansible Version
Configuration
(empty)
OS / Environment
control host: MacOS 10.15.7
remove host: Ubuntu 20.04.2 LTS
Steps to Reproduce
Try to add any binary gpg key:
Expected Results
The gpg key added to the keyring
Actual Results
TASK [Add binary key] ********************************************************************************************************************************************************************************************************************************************************** fatal: [ubuntu]: FAILED! => {"changed": false, "msg": "Unable to extract key from '-'", "stderr": "gpg: directory '/root/.gnupg' created\ngpg: keybox '/root/.gnupg/pubring.kbx' created\ngpg: WARNING: no command supplied. Trying to guess what you mean ...\ngpg: /root/.gnupg/trustdb.gpg: trustdb created\ngpg: [don't know]: invalid packet (ctb=0a)\n", "stderr_lines": ["gpg: directory '/root/.gnupg' created", "gpg: keybox '/root/.gnupg/pubring.kbx' created", "gpg: WARNING: no command supplied. Trying to guess what you mean ...", "gpg: /root/.gnupg/trustdb.gpg: trustdb created", "gpg: [don't know]: invalid packet (ctb=0a)"], "stdout": "pub:-:2048:1:FEEA9169307EA071:1614614617:1677728521::-:\nuid:::::::::Rapture Automatic Signing Key (cloud-rapture-signing-key-2021-03-01-08_01_09.pub):\nsub:-:2048:1:AA42F36EE8BEEE0E:1614614617::::\npub:-:2048:1:8B57C5C2836F4BEB:1607040606:1670154510::-:\nuid:::::::::gLinux Rapture Automatic Signing Key (//depot/google3/production/borg/cloud-rapture/keys/cloud-rapture-pubkeys/cloud-rapture-signing-key-2020-12-03-16_08_05.pub) <glinux-team@google.com>:\nsub:-:2048:1:48419E688DD52AC0:1607040606::::\n", "stdout_lines": ["pub:-:2048:1:FEEA9169307EA071:1614614617:1677728521::-:", "uid:::::::::Rapture Automatic Signing Key (cloud-rapture-signing-key-2021-03-01-08_01_09.pub):", "sub:-:2048:1:AA42F36EE8BEEE0E:1614614617::::", "pub:-:2048:1:8B57C5C2836F4BEB:1607040606:1670154510::-:", "uid:::::::::gLinux Rapture Automatic Signing Key (//depot/google3/production/borg/cloud-rapture/keys/cloud-rapture-pubkeys/cloud-rapture-signing-key-2020-12-03-16_08_05.pub) <glinux-team@google.com>:", "sub:-:2048:1:48419E688DD52AC0:1607040606::::"]}
Code of Conduct
The text was updated successfully, but these errors were encountered: