Ansible 2.1.0 docker_container module not pulling image when missing on remote host

196 views
Skip to first unread message

ishan jain

unread,
Aug 24, 2016, 2:22:37 AM8/24/16
to Ansible Project
The documentation says:

Repository path and tag used to create the container. If an image is not found or pull is true, the image will be pulled from the registry.

But a simple usage of docker_container:

    - name: start docker container
      docker_container:
        name: container1
        image: image:1.0
        state: started

Yields the error:

fatal: [docker1]: FAILED! => {"changed": false, "failed": true, "msg": "Error creating container: 404 Client Error: Not Found (\"No such image: image:1.0.0\")"}


The docker login is done on the remote docker host to pull from my private docker repo and the playbook works fine after i manually executed the docker pull command. I thought the module will try to pull image if not found locally.
Reply all
Reply to author
Forward
0 new messages