oracle-java
oracle-java copied to clipboard
the task "ensure the apt repository key is present" fails on debian 9.4
Hello,
When I run my playbook using this role, it succeed on my Ubuntu's virtual machine, but, it fails on my Debian 9.4 Stretch VM. The error message is as follow:
fatal: [debian]: FAILED! => { "changed": false, "cmd": "/usr/bin/apt-key adv --no-tty --keyserver keyserver.ubuntu.com --recv EA8CACC073C3DB2A", "invocation": { "module_args": { "data": null, "file": null, "id": "0xEA8CACC073C3DB2A", "key": null, "keyring": null, "keyserver": "keyserver.ubuntu.com", "state": "present", "url": null, "validate_certs": true } }, "msg": "Error fetching key EA8CACC073C3DB2A from keyserver: keyserver.ubuntu.com", "rc": 2, "stderr": "Warning: apt-key output should not be parsed (stdout is not a terminal)\ngpg: keyserver receive failed: No keyserver available\n", "stderr_lines": [ "Warning: apt-key output should not be parsed (stdout is not a terminal)", "gpg: keyserver receive failed: **No keyserver available**" ], "stdout": "Executing: /tmp/apt-key-gpghome.o1KSgB9ipq/gpg.1.sh --no-tty --keyserver keyserver.ubuntu.com --recv EA8CACC073C3DB2A\n", "stdout_lines": [ "Executing: /tmp/apt-key-gpghome.o1KSgB9ipq/gpg.1.sh --no-tty --keyserver keyserver.ubuntu.com --recv EA8CACC073C3DB2A" ] }
But when i execute manually apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2A
the key is added successfully.
Any ideas??
@tayebBenAchour I have no clue. I'd have to replicate this on my local environment but I'm not sure when I will have time. what is the ansible + python version you are running this?
if you are in a hurry, I suggest going the Test
section on the README.md
file.
if you have vagrant, bash and tox you should be able to run the tests or debug this yourself.
@steenzout
I'm using Ansible 2.7.5 and python 2.7.12
@tayebBenAchour I've managed to simulate the problem on Stretch 9.7.0.
I'll prepare a patch asap.
$ tox -e py27-ansible27 -- --box stretch64.vagrant.dev