Hi all,
I’m using the Docker module Ansible provides and I’m currently facing a little problem with it. I need further information to find the solution.
Here is the task I’m using in the playbook:
`
- name: Run the docker container for the service in QA
docker:
docker_api_version: “1.17”
name: “{{ service }}”
image: “{{docker_image_uri}}:{{ docker_tag }}”
env: “{{ ENV_VARS }}”
state: reloaded
pull: always
ports: “{{http_port}}:5000”
`
I’m using exactly the same code for 4 different services I’m deploying but I have the following problem with two of them:
The docker container is always reloaded regardless the docker image has changed or not
Given that situation, I need to understand how Ansible makes the decision to restart the container or not.
I hope I’ve been clear enough in my question. Any insight?
Thanks in advance.
The information contained in this message is for the intended addressee only and may contain confidential and/or privileged information. If you are not the intended addressee, please delete this message and notify the sender; do not copy or distribute this message or disclose its contents to anyone. Any views or opinions expressed in this message are those of the author and do not necessarily represent those of Motortrak Limited or of any of its associated companies. No reliance may be placed on this message without written confirmation from an authorised representative of the company.
Registered in England 3098391 V.A.T. Registered No. 667463890