Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tayebBenAchour opened this issue Jan 18, 2019 · 4 comments
Milestone

Comments

@tayebBenAchour
Copy link

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??

@steenzout
Copy link
Member

@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.

@tayebBenAchour
Copy link
Author

@steenzout
I'm using Ansible 2.7.5 and python 2.7.12

@steenzout
Copy link
Member

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

I'll prepare a patch asap.

@steenzout
Copy link
Member

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

@steenzout steenzout added this to the 6.22.10 milestone Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants