docker-ubuntu1804-ansible
docker-ubuntu1804-ansible copied to clipboard
dirmngr missing
When trying to test a role that adds a GPG key to APT I get the following error:
fatal: [instance]: FAILED! => {"changed": false, "cmd": "/usr/bin/apt-key --keyring /etc/apt/trusted.gpg.d/percona.gpg adv --no-tty --keyserver keyserver.ubuntu.com --recv 8507EFA5", "msg": "Error fetching key 8507EFA5 from keyserver: keyserver.ubuntu.com", "rc": 2, "stderr": "Warning: apt-key output should not be parsed (stdout is not a terminal)\ngpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory\ngpg: connecting dirmngr at '/tmp/apt-key-gpghome.g4vK4zGNaE/S.dirmngr' failed: No such file or directory\ngpg: keyserver receive failed: No dirmngr\n", "stderr_lines": ["Warning: apt-key output should not be parsed (stdout is not a terminal)", "gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory", "gpg: connecting dirmngr at '/tmp/apt-key-gpghome.g4vK4zGNaE/S.dirmngr' failed: No such file or directory", "gpg: keyserver receive failed: No dirmngr"], "stdout": "Executing: /tmp/apt-key-gpghome.g4vK4zGNaE/gpg.1.sh --no-tty --keyserver keyserver.ubuntu.com --recv 8507EFA5\n", "stdout_lines": ["Executing: /tmp/apt-key-gpghome.g4vK4zGNaE/gpg.1.sh --no-tty --keyserver keyserver.ubuntu.com --recv 8507EFA5"]}
Installing dirmngr
solves the issue. Xenial is not affected by this issue.
I encounter the same error on docker-ubuntu-2004-ansible
Add the dirmngr
installation task to your flow
- name: install dirmngr
apt:
state: present
package: dirmngr