2016-01-19 14:23:19 +00:00
|
|
|
---
|
2020-03-24 15:12:47 +00:00
|
|
|
- import_tasks: install_etcdctl_docker.yml
|
2018-04-01 16:58:08 +00:00
|
|
|
when: etcd_cluster_setup
|
2018-02-12 16:34:01 +00:00
|
|
|
|
2022-03-12 02:08:23 +00:00
|
|
|
- name: Get currently-deployed etcd version
|
|
|
|
shell: "{{ docker_bin_dir }}/docker ps --filter='name={{ etcd_member_name }}' --format='{{ '{{ .Image }}' }}'"
|
|
|
|
register: etcd_current_docker_image
|
|
|
|
when: etcd_cluster_setup
|
|
|
|
|
|
|
|
- name: Get currently-deployed etcd-events version
|
|
|
|
shell: "{{ docker_bin_dir }}/docker ps --filter='name={{ etcd_member_name }}-events' --format='{{ '{{ .Image }}' }}'"
|
|
|
|
register: etcd_events_current_docker_image
|
|
|
|
when: etcd_events_cluster_setup
|
|
|
|
|
|
|
|
- name: Restart etcd if necessary
|
|
|
|
command: /bin/true
|
|
|
|
notify: restart etcd
|
|
|
|
when:
|
|
|
|
- etcd_cluster_setup
|
|
|
|
- etcd_image_tag not in etcd_current_docker_image.stdout|default('')
|
|
|
|
|
|
|
|
- name: Restart etcd-events if necessary
|
|
|
|
command: /bin/true
|
|
|
|
notify: restart etcd-events
|
|
|
|
when:
|
|
|
|
- etcd_events_cluster_setup
|
|
|
|
- etcd_image_tag not in etcd_events_current_docker_image.stdout|default('')
|
|
|
|
|
2018-02-12 16:34:01 +00:00
|
|
|
- name: Install etcd launch script
|
|
|
|
template:
|
|
|
|
src: etcd.j2
|
|
|
|
dest: "{{ bin_dir }}/etcd"
|
|
|
|
owner: 'root'
|
2018-04-01 16:58:08 +00:00
|
|
|
mode: 0750
|
2018-02-12 16:34:01 +00:00
|
|
|
backup: yes
|
2018-04-01 16:58:08 +00:00
|
|
|
when: etcd_cluster_setup
|
2018-03-01 08:39:14 +00:00
|
|
|
|
|
|
|
- name: Install etcd-events launch script
|
|
|
|
template:
|
|
|
|
src: etcd-events.j2
|
|
|
|
dest: "{{ bin_dir }}/etcd-events"
|
|
|
|
owner: 'root'
|
2018-04-01 16:58:08 +00:00
|
|
|
mode: 0750
|
2018-03-01 08:39:14 +00:00
|
|
|
backup: yes
|
|
|
|
when: etcd_events_cluster_setup
|