2016-01-19 22:23:19 +08:00
|
|
|
---
|
2016-12-14 01:20:22 +08:00
|
|
|
- name: Install | Copy etcdctl binary from docker container
|
2016-12-23 22:44:44 +08:00
|
|
|
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 }} &&
|
2017-10-04 20:27:55 +08:00
|
|
|
{{ docker_bin_dir }}/docker cp etcdctl-binarycopy:/usr/local/bin/etcdctl {{ bin_dir }}/etcdctl &&
|
2016-12-23 22:44:44 +08:00
|
|
|
{{ docker_bin_dir }}/docker rm -f etcdctl-binarycopy"
|
2016-09-13 20:36:01 +08:00
|
|
|
register: etcd_task_result
|
|
|
|
until: etcd_task_result.rc == 0
|
|
|
|
retries: 4
|
2016-09-15 17:23:27 +08:00
|
|
|
delay: "{{ retry_stagger | random + 3 }}"
|
2016-01-22 23:37:07 +08:00
|
|
|
changed_when: false
|
2018-04-02 00:58:08 +08:00
|
|
|
when: etcd_cluster_setup
|
2018-02-13 00:34:01 +08:00
|
|
|
|
|
|
|
- name: Install etcd launch script
|
|
|
|
template:
|
|
|
|
src: etcd.j2
|
|
|
|
dest: "{{ bin_dir }}/etcd"
|
|
|
|
owner: 'root'
|
2018-04-02 00:58:08 +08:00
|
|
|
mode: 0750
|
2018-02-13 00:34:01 +08:00
|
|
|
backup: yes
|
2018-04-02 00:58:08 +08:00
|
|
|
when: etcd_cluster_setup
|
2018-03-01 16:39:14 +08:00
|
|
|
|
|
|
|
- name: Install etcd-events launch script
|
|
|
|
template:
|
|
|
|
src: etcd-events.j2
|
|
|
|
dest: "{{ bin_dir }}/etcd-events"
|
|
|
|
owner: 'root'
|
2018-04-02 00:58:08 +08:00
|
|
|
mode: 0750
|
2018-03-01 16:39:14 +08:00
|
|
|
backup: yes
|
|
|
|
when: etcd_events_cluster_setup
|