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 }}