Reputation: 55
I am trying to pull docker images from nexus3 repository using ansible. But I am getting error as fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error connecting: Error while fetching server API version: ('Connection aborted.', error(2, 'No such file or directory'))"}
I tried with below ansible playbook to pull the docker images. Point to be noted is our Infra team is not ready to install docker on Linux machine (where ansible is installed). So I am trying to use docker_image module to pull the images.
- name: Pull docker images to local machine
hosts: localhost
environment:
PYTHONPATH: "/XXXX/python2.7/site-packages"
tasks:
- name: Pull docker images to local machines
docker_image:
name: https://XXXX/dockerimagename
pull: yes
The expected output is to pull a specific image from nexus 3 docker repository,
Upvotes: 0
Views: 7462
Reputation: 18578
from the docs
Requirements
The below requirements are needed on the host that executes this module.
Docker API >= 1.20 Docker SDK for Python: Please note that the docker-py Python module has been superseded by docker (see here for details). For Python 2.6, docker-py must be used. Otherwise, it is recommended to install the docker Python module. Note that both modules should not be installed at the same time. Also note that when both modules are installed and one of them is uninstalled, the other might no longer function and a reinstall of it is required. Docker SDK for Python >= 1.8.0 (use docker-py for Python 2.6)
so you can not use the module without the installation of the above requirment .
Upvotes: 0