geerlingguy / docker-ubuntu1804-ansible

Ubuntu 18.04 LTS (Bionic) Docker container for Ansible playbook and role testing.
https://hub.docker.com/r/geerlingguy/docker-ubuntu1804-ansible/
MIT License
78 stars 53 forks source link

dirmngr missing #6

Open sagikazarmark opened 5 years ago

sagikazarmark commented 5 years ago

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.

sobornostea commented 3 years ago

I encounter the same error on docker-ubuntu-2004-ansible

EclipseAltair commented 3 years ago

Add the dirmngr installation task to your flow

- name: install dirmngr
  apt:
    state: present
    package: dirmngr