From fbe9e0ac1aff2ce8f7eeb37d77441ab44bfa242e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hedayat=20Vatankhah=20=28=D9=87=D8=AF=D8=A7=DB=8C=D8=AA=29?= Date: Thu, 20 Dec 2018 12:28:21 +0330 Subject: [PATCH] Fix docker_options definition when docker_version is 'latest' rather than a number (#3919) - NOTE: it assumes that the 'latest' version is newer than 17.05 --- inventory/sample/group_vars/all/docker.yml | 2 +- roles/kubespray-defaults/defaults/main.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory/sample/group_vars/all/docker.yml b/inventory/sample/group_vars/all/docker.yml index eeb219b58..b7e93c14d 100644 --- a/inventory/sample/group_vars/all/docker.yml +++ b/inventory/sample/group_vars/all/docker.yml @@ -57,7 +57,7 @@ docker_options: >- {% if docker_registry_mirrors is defined %} {{ docker_registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }} {%- endif %} - {%- if docker_version is version('17.05', '<') %} + {%- if docker_version != "latest" and docker_version is version('17.05', '<') %} --graph={{ docker_daemon_graph }} {{ docker_log_opts }} {%- else %} --data-root={{ docker_daemon_graph }} {{ docker_log_opts }} diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml index 4ac7755ba..269e1cae9 100644 --- a/roles/kubespray-defaults/defaults/main.yaml +++ b/roles/kubespray-defaults/defaults/main.yaml @@ -216,7 +216,7 @@ docker_options: >- {% if docker_registry_mirrors is defined %} {{ docker_registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }} {%- endif %} - {%- if docker_version is version('17.05', '<') %} + {%- if docker_version != "latest" and docker_version is version('17.05', '<') %} --graph={{ docker_daemon_graph }} {{ docker_log_opts }} {%- else %} --data-root={{ docker_daemon_graph }} {{ docker_log_opts }}