From d316b02d28715016fb33ccc3ac5035f62153c19c Mon Sep 17 00:00:00 2001 From: Christopher Randles Date: Tue, 14 Apr 2020 10:06:12 -0400 Subject: [PATCH] else condition required otherwise AnsibleUndefinedVariable is triggered (#5722) --- roles/container-engine/docker/templates/docker.service.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/container-engine/docker/templates/docker.service.j2 b/roles/container-engine/docker/templates/docker.service.j2 index b8ea29552..726ce70af 100644 --- a/roles/container-engine/docker/templates/docker.service.j2 +++ b/roles/container-engine/docker/templates/docker.service.j2 @@ -3,16 +3,16 @@ 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', '>=') }} +{{ 'BindsTo=containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') else '' }} {{ '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', '>=') }} +{{ 'BindsTo=containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') else '' }} Wants=docker.socket {% elif ansible_os_family == "Suse" %} After=network.target lvm2-monitor.service SuSEfirewall2.service # 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', '>=') }} +# {{ 'BindsTo=containerd.service' if installed_docker_version.stdout is version('18.09.1', '>=') else '' }} {% endif %} [Service]