修复docker安装时版本判断条件

pull/505/head
gjmzj 2019-03-29 12:50:39 +08:00
parent 89f6cc15d5
commit eca81279b7
1 changed files with 5 additions and 5 deletions

View File

@ -16,9 +16,9 @@
DOCKER_VER: "{{ docker_ver.stdout.split('.')[0]|int + docker_ver.stdout.split('.')[1]|int/100 }}"
tags: upgrade_docker, download_docker
#- name: debug info
# debug: var="DOCKER_VER"
# tags: upgrade_docker, download_docker
- name: debug info
debug: var="DOCKER_VER"
tags: upgrade_docker, download_docker
- block:
- name: 准备docker相关目录
@ -39,7 +39,7 @@
- dockerd
- docker-proxy
tags: upgrade_docker, download_docker
when: "DOCKER_VER < 18.09"
when: "DOCKER_VER|float < 18.09"
- name: 下载 docker 二进制文件(>= 18.09.x)
copy: src={{ base_dir }}/bin/{{ item }} dest={{ bin_dir }}/{{ item }} mode=0755
@ -53,7 +53,7 @@
- dockerd
- docker-proxy
tags: upgrade_docker, download_docker
when: "DOCKER_VER >= 18.09"
when: "DOCKER_VER|float >= 18.09"
- name: docker命令自动补全
copy: src=docker dest=/etc/bash_completion.d/docker mode=0644