kayobe/ansible/roles/kolla-ansible/templates/daemon.json.j2
Mark Goddard efb8b8bd27 Use docker_custom_config variable
In the Train cycle, Kolla Ansible added support for
docker_custom_config, and writes out configuration to
/etc/docker/daemon.json. This will conflict with Kayobe's configuration
of that file, and changes made by kayobe will be reversed when
kolla-ansible bootstrap-servers is run.

This change uses the new variable to pass daemon.json configuration
through to kolla ansible. Because the ordering has changed, we also need
to separate out the devicemapper setup and run this prior to starting
docker.

Change-Id: Idc3fa9fefd8242ef9db76d4d773885e3594b453a
Depends-On: https://review.opendev.org/691001
Story: 2006764
Task: 37277
2019-10-25 17:08:56 +01:00

23 lines
697 B
Django/Jinja

{
{%- if docker_registry_mirrors | length > 0 %}
"registry-mirrors": [
{%- for mirror in docker_registry_mirrors %}
"{{ mirror }}"{%- if not loop.last -%},{%- endif %}
{%- endfor %}
],
{%- endif %}
{% if docker_daemon_mtu %}
"mtu": {{ docker_daemon_mtu }},
{% endif %}
{% if docker_daemon_live_restore %}
"live-restore": {{ docker_daemon_live_restore | to_json }},
{% endif %}
"storage-opts": [
{% if docker_storage_driver == 'devicemapper' %}
"dm.thinpooldev=/dev/mapper/{{ docker_storage_volume_group | replace('-', '--') }}-{{ docker_storage_volume_thinpool | replace('-', '--') }}",
"dm.use_deferred_removal=true",
"dm.use_deferred_deletion=true"
{% endif %}
]
}