fix当偶然出现docker安装失败的错误

pull/644/head
gjmzj 2019-07-17 22:53:24 +08:00
parent 8996741419
commit 2f82e931ec
1 changed files with 17 additions and 17 deletions

View File

@ -11,24 +11,24 @@
register: install_info
tags: upgrade_docker, download_docker
- block:
# 18.09.x 版本二进制名字有变化,需要做判断
- name: 获取docker版本信息
# 18.09.x 版本二进制名字有变化,需要做判断
- name: 获取docker版本信息
shell: "{{ base_dir }}/bin/dockerd --version|cut -d' ' -f3"
register: docker_ver
connection: local
run_once: true
tags: upgrade_docker, download_docker
- name: 转换docker版本信息为浮点数
- name: 转换docker版本信息为浮点数
set_fact:
DOCKER_VER: "{{ docker_ver.stdout.split('.')[0]|int + docker_ver.stdout.split('.')[1]|int/100 }}"
tags: upgrade_docker, download_docker
- name: debug info
- name: debug info
debug: var="DOCKER_VER"
tags: upgrade_docker, download_docker
- block:
- name: 准备docker相关目录
file: name={{ item }} state=directory
with_items: