kayobe/ansible/inventory/group_vars/all/docker-registry
Mark Goddard af3b719b73 Move group_vars to an inventory directory
The group variables originally in ansible/group_vars/ were playbook
group variables, due to being adjacent to the playbooks. Typically they
provided default values for global variables in the all group, as well
as some more specific groups. This has worked fairly well, but results
in (at least) a couple of problems.

1. The default variable precedence rules mean that these playbook group
   variables have a higher precedence than inventory group variables
   (for a given group). This can make it challenging to override
   playbook group variables in the inventory in Kayobe configuration.

2. Any playbook run by Kayobe must be in the same directory as the
   playbook group variables in order to use them. Given that they
   include variables required for connectivity such as ansible_host and
   ansible_user, this is quite critical. For Kayobe custom playbooks, we
   work around this by symlinking to the group_vars directory from the
   directory containing the custom playbook. This is not an elegant
   workaround, and has assumptions about the relative paths of the
   Kayobe configuration and virtual environment in which Kayobe is
   installed.

Story: 2010280
Task: 46233

Change-Id: Ifea5c7e73f6f410f96a7398bfd349d1f631d9fc0
2022-09-08 10:11:23 +01:00

42 lines
1.5 KiB
Plaintext

---
###############################################################################
# Docker registry configuration.
# Whether a docker registry is enabled.
docker_registry_enabled: False
# 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: {}
# The network mode of the docker registry container. Default is 'host'.
docker_registry_network_mode: host
# The port on which the docker registry server should listen.
# NOTE: This is set to 4000 rather than the default of 5000 to avoid clashing
# with keystone.
docker_registry_port: 4000
# Name or path to use as the volume for the docker registry.
docker_registry_datadir_volume: docker_registry
# Whether to enable TLS for the registry.
docker_registry_enable_tls: false
# Path to a TLS certificate to use when TLS is enabled.
docker_registry_cert_path:
# Path to a TLS key to use when TLS is enabled.
docker_registry_key_path:
# Whether to enable basic authentication for the registry.
docker_registry_enable_basic_auth: false
# Path to a htpasswd formatted password store for the registry.
docker_registry_basic_auth_htpasswd_path: