oracle-java icon indicating copy to clipboard operation
oracle-java copied to clipboard

the task "ensure the apt repository key is present" fails on debian 9.4

Open tayebBenAchour opened this issue 5 years ago • 4 comments

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 avatar Jan 18 '19 14:01 tayebBenAchour

@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 avatar Jan 31 '19 22:01 steenzout

@steenzout
I'm using Ansible 2.7.5 and python 2.7.12

tayebBenAchour avatar Feb 11 '19 09:02 tayebBenAchour

@tayebBenAchour I've managed to simulate the problem on Stretch 9.7.0.

I'll prepare a patch asap.

steenzout avatar Feb 12 '19 21:02 steenzout

$ tox -e py27-ansible27 -- --box stretch64.vagrant.dev

steenzout avatar Feb 12 '19 21:02 steenzout