Skip to content

Commit

Permalink
修复docker安装时版本判断条件
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Mar 29, 2019
1 parent 89f6cc1 commit eca8127
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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相关目录
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit eca8127

Please sign in to comment.