Bind Docker service to containerd.service on versions >=18.09.1 (#5477)

This commit is contained in:
Preslav Draganov 2020-02-07 10:15:44 +00:00 committed by GitHub
parent b7527399b5
commit 422b25ab1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,12 +3,15 @@ Description=Docker Application Container Engine
Documentation=http://docs.docker.com Documentation=http://docs.docker.com
{% if ansible_os_family == "RedHat" %} {% 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 '' }} 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 '' }} {{ 'Wants=docker-storage-setup.service' if docker_container_storage_setup else '' }}
{% elif ansible_os_family == "Debian" %} {% elif ansible_os_family == "Debian" %}
After=network.target docker.socket{{ ' containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') else '' }} 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 Wants=docker.socket
{% elif ansible_os_family == "Suse" %} {% elif ansible_os_family == "Suse" %}
After=network.target{{ ' containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') else '' }} 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 %} {% endif %}
[Service] [Service]