Fix install etcd by host service (#2297)

Fix bug issues #2289
This commit is contained in:
RongZhang
2018-02-12 10:34:01 -06:00
committed by Matthew Mosesohn
parent 5903aea86f
commit c0aad0a6d5
5 changed files with 23 additions and 11 deletions

View File

@@ -0,0 +1,12 @@
---
- name: Install | Copy etcdctl and etcd binary from docker container
command: sh -c "{{ docker_bin_dir }}/docker rm -f etcdctl-binarycopy;
{{ docker_bin_dir }}/docker create --name etcdctl-binarycopy {{ etcd_image_repo }}:{{ etcd_image_tag }} &&
{{ docker_bin_dir }}/docker cp etcdctl-binarycopy:/usr/local/bin/etcdctl {{ bin_dir }}/etcdctl &&
{{ docker_bin_dir }}/docker cp etcdctl-binarycopy:/usr/local/bin/etcd {{ bin_dir }}/etcd &&
{{ docker_bin_dir }}/docker rm -f etcdctl-binarycopy"
register: etcd_task_result
until: etcd_task_result.rc == 0
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
changed_when: false