question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to perform docker pull via ansible

See original GitHub issue

HOST

  • Ubuntu 19.10
  • Ansible 2.9.9 (latest)
  • Mitogen 0.2.9 (latest)
  • Python 3.7.5
  • ansible-config dump --only-changed yields an empty file
  • Nothing custom

TARGET

  • Ubuntu 18.04
  • Python ? There are multiple versions on the target machine, so I ran ansible -m setup machinename and it showed me "ansible_python_version": "2.7.17". I hope that’s right?

PROBLEM

In a playbook:

- name: pull image
  docker_image:
    name: imagename:v1.2.3
    source: pull

Error:

“msg”: “Failed to import the required Python library (Docker SDK for Python: docker (Python >= 2.7) or docker-py (Python 2.6)) on remote’s Python /usr/bin/python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter, for example via pip install docker or pip install docker-py (Python 2.6). The error was: u’requests’ is present in the Mitogen importer blacklist, therefore this context will not attempt to request it from the master, as the request will always be refused.”

This is part of a very large playbook which seems to work, only this task fails. And without mitogen this task works.

I have no idea what the problem could be?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
s1113950commented, Dec 28, 2020

There’s a new rc now for Ansible 2.10+: https://github.com/dw/mitogen/releases/tag/v0.3.0-rc.0

1reaction
s1113950commented, May 27, 2020

Perf on Python3 is not yet as good as Python2, but eventually the plan is to fix that up 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker_container fails while pulling new image #5515 - GitHub
Execute ansible -playbook with the following play: - name: "Start container" docker_container: name: whatever image: "httpd" pull: true.
Read more >
Ansible Shell Cannot Pull Docker Image - Stack Overflow
I've run into issues pulling Docker images from a private DockerHub repo using the Docker module of Ansible, so to sanity-check that code ......
Read more >
Cannot pull ansible docker image - DevOps Stack Exchange
I try and get started with ansible but I get the above error message trying to pull the Docker image. Is it broken...
Read more >
Ansible for Docker Deployment - Mike Polinowski
I will try to solve this by running pip install docker on my host system. If this works, this step has to be...
Read more >
"Command Failed" Error When Starting the Ansible Container
This occurs when the Docker Engine is not running on a node. To resolve this issue: Ensure that the Docker Engine is running...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found