kayobe/ansible/roles/docker-registry/defaults/main.yml

48 lines
1.8 KiB
YAML

---
# Roughly follows kolla-ansible's service deployment patterns.
# Action to perform. One of 'deploy', 'destroy', 'pull', 'reconfigure',
# 'upgrade'.
docker_registry_action: deploy
# Whether a docker registry is enabled.
docker_registry_enabled: true
# Dict of environment variables to provide to the docker registry container.
# This allows to configure the registry by overriding specific configuration
# options, as described at https://docs.docker.com/registry/configuration/
# For example, the registry can be configured as a pull through cache to Docker
# Hub by setting REGISTRY_PROXY_REMOTEURL to "https://registry-1.docker.io".
# Note that it is not possible to push to a registry configured as a
# pull through cache.
docker_registry_env: {}
# Service deployment definition.
docker_registry_services:
docker_registry:
container_name: docker_registry
env: "{{ docker_registry_env }}"
enabled: "{{ docker_registry_enabled }}"
image: "{{ docker_registry_image_full }}"
ports:
- "{{ docker_registry_port }}:5000"
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "docker_registry:/var/lib/registry"
# The port on which the docker registry server should listen.
docker_registry_port: 5000
####################
# Docker
####################
# NOTE: Namespace 'library' causes image task to always be changed and
# container to never update to new images.
docker_registry_namespace: ""
docker_registry_image: "{{ docker_registry ~ '/' if docker_registry | default else '' }}{{ docker_registry_namespace ~ '/' if docker_registry_namespace else '' }}registry"
docker_registry_tag: "latest"
docker_registry_image_full: "{{ docker_registry_image }}:{{ docker_registry_tag }}"
docker_registry_restart_policy: "unless-stopped"
#docker_registry_restart_retries: