Pierre Riteau e642ba11b3 Allow to configure Docker Registry via environment variables
Change-Id: Ida7b870e86894bd33e923ae1cc1142d32e052ddc
Story: 2004817
Task: 28982
2019-01-31 11:40:34 +00:00

15 lines
653 B
YAML

---
- name: Ensure Docker registry container is running
docker_container:
env: "{{ item.value.env }}"
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 | default(omit) }}"
state: "{{ item.value.enabled | ternary('started', 'absent') }}"
volumes: "{{ item.value.volumes }}"
with_dict: "{{ docker_registry_services }}"