Rename runtime docker_version (#2082)

Renaming runtime docker_version to prevent setting that
value on the command line from breaking the play run.

This fixes #2081
This commit is contained in:
Evan Zeimet 2017-12-19 08:47:54 -06:00 committed by Matthew Mosesohn
parent b2cb0725ac
commit a6975c1850
2 changed files with 3 additions and 3 deletions

View file

@ -76,7 +76,7 @@
- name: set fact for docker_version - name: set fact for docker_version
command: "docker version -f '{{ '{{' }}.Client.Version{{ '}}' }}'" command: "docker version -f '{{ '{{' }}.Client.Version{{ '}}' }}'"
register: docker_version register: installed_docker_version
changed_when: false changed_when: false
- name: check minimum docker version for docker_dns mode. You need at least docker version >= 1.12 for resolvconf_mode=docker_dns - name: check minimum docker version for docker_dns mode. You need at least docker version >= 1.12 for resolvconf_mode=docker_dns
@ -85,7 +85,7 @@
when: > when: >
dns_mode != 'none' and dns_mode != 'none' and
resolvconf_mode == 'docker_dns' and resolvconf_mode == 'docker_dns' and
docker_version.stdout|version_compare('1.12', '<') installed_docker_version.stdout|version_compare('1.12', '<')
- name: Set docker systemd config - name: Set docker systemd config
include: systemd.yml include: systemd.yml

View file

@ -18,7 +18,7 @@ Environment=GOTRACEBACK=crash
ExecReload=/bin/kill -s HUP $MAINPID ExecReload=/bin/kill -s HUP $MAINPID
Delegate=yes Delegate=yes
KillMode=process KillMode=process
ExecStart={{ docker_bin_dir }}/docker{% if docker_version.stdout|version_compare('17.03', '<') %} daemon{% else %}d{% endif %} \ ExecStart={{ docker_bin_dir }}/docker{% if installed_docker_version.stdout|version_compare('17.03', '<') %} daemon{% else %}d{% endif %} \
$DOCKER_OPTS \ $DOCKER_OPTS \
$DOCKER_STORAGE_OPTIONS \ $DOCKER_STORAGE_OPTIONS \
$DOCKER_NETWORK_OPTIONS \ $DOCKER_NETWORK_OPTIONS \