943a4cdb66
Previously the docker-registry container would not be upgraded when a new image is downloaded. We now ensure that new images are tagged in the local repository, and pull the image separately from the container upgrade.
14 lines
632 B
YAML
14 lines
632 B
YAML
---
|
|
- name: Ensure Docker registry container is running
|
|
docker_container:
|
|
image: "{{ item.value.image }}"
|
|
name: "{{ item.value.container_name }}"
|
|
ports: "{{ item.value.ports | default(omit) }}"
|
|
privileged: "{{ item.value.privileged | default(omit) }}"
|
|
read_only: "{{ item.value.read_only | default(omit) }}"
|
|
restart_policy: "{{ docker_registry_restart_policy }}"
|
|
restart_retries: "{{ docker_registry_restart_retries }}"
|
|
state: "{{ 'started' if item.value.enabled and action != 'destroy' | bool else 'absent' }}"
|
|
volumes: "{{ item.value.volumes }}"
|
|
with_dict: "{{ docker_registry_services }}"
|