mirror of https://github.com/easzlab/kubeasz.git
fix当偶然出现docker安装失败的错误
parent
8996741419
commit
2f82e931ec
|
@ -11,24 +11,24 @@
|
||||||
register: install_info
|
register: install_info
|
||||||
tags: upgrade_docker, download_docker
|
tags: upgrade_docker, download_docker
|
||||||
|
|
||||||
- block:
|
# 18.09.x 版本二进制名字有变化,需要做判断
|
||||||
# 18.09.x 版本二进制名字有变化,需要做判断
|
- name: 获取docker版本信息
|
||||||
- name: 获取docker版本信息
|
|
||||||
shell: "{{ base_dir }}/bin/dockerd --version|cut -d' ' -f3"
|
shell: "{{ base_dir }}/bin/dockerd --version|cut -d' ' -f3"
|
||||||
register: docker_ver
|
register: docker_ver
|
||||||
connection: local
|
connection: local
|
||||||
run_once: true
|
run_once: true
|
||||||
tags: upgrade_docker, download_docker
|
tags: upgrade_docker, download_docker
|
||||||
|
|
||||||
- name: 转换docker版本信息为浮点数
|
- name: 转换docker版本信息为浮点数
|
||||||
set_fact:
|
set_fact:
|
||||||
DOCKER_VER: "{{ docker_ver.stdout.split('.')[0]|int + docker_ver.stdout.split('.')[1]|int/100 }}"
|
DOCKER_VER: "{{ docker_ver.stdout.split('.')[0]|int + docker_ver.stdout.split('.')[1]|int/100 }}"
|
||||||
tags: upgrade_docker, download_docker
|
tags: upgrade_docker, download_docker
|
||||||
|
|
||||||
- name: debug info
|
- name: debug info
|
||||||
debug: var="DOCKER_VER"
|
debug: var="DOCKER_VER"
|
||||||
tags: upgrade_docker, download_docker
|
tags: upgrade_docker, download_docker
|
||||||
|
|
||||||
|
- block:
|
||||||
- name: 准备docker相关目录
|
- name: 准备docker相关目录
|
||||||
file: name={{ item }} state=directory
|
file: name={{ item }} state=directory
|
||||||
with_items:
|
with_items:
|
||||||
|
|
Loading…
Reference in New Issue