From 422b25ab1fe6291eeabda880a93f4c2b0741bd9c Mon Sep 17 00:00:00 2001 From: Preslav Draganov Date: Fri, 7 Feb 2020 10:15:44 +0000 Subject: [PATCH] Bind Docker service to containerd.service on versions >=18.09.1 (#5477) --- roles/container-engine/docker/templates/docker.service.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/container-engine/docker/templates/docker.service.j2 b/roles/container-engine/docker/templates/docker.service.j2 index 2e259f87b..078df37e1 100644 --- a/roles/container-engine/docker/templates/docker.service.j2 +++ b/roles/container-engine/docker/templates/docker.service.j2 @@ -3,12 +3,15 @@ Description=Docker Application Container Engine Documentation=http://docs.docker.com {% if ansible_os_family == "RedHat" %} After=network.target {{ ' docker-storage-setup.service' if docker_container_storage_setup else '' }}{{ ' containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') else '' }} +{{ 'BindsTo=containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') }} {{ 'Wants=docker-storage-setup.service' if docker_container_storage_setup else '' }} {% elif ansible_os_family == "Debian" %} After=network.target docker.socket{{ ' containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') else '' }} +{{ 'BindsTo=containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') }} Wants=docker.socket {% elif ansible_os_family == "Suse" %} After=network.target{{ ' containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') else '' }} +{{ 'BindsTo=containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') }} {% endif %} [Service]