diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 4f78a96..3c48376 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -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