2016-01-19 22:23:19 +08:00
|
|
|
---
|
2022-03-12 10:08:23 +08: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
|
2023-07-26 22:36:22 +08:00
|
|
|
notify: Restart etcd
|
2022-03-12 10:08:23 +08:00
|
|
|
when:
|
|
|
|
- etcd_cluster_setup
|
2023-07-05 11:36:54 +08:00
|
|
|
- etcd_image_tag not in etcd_current_docker_image.stdout | default('')
|
2022-03-12 10:08:23 +08:00
|
|
|
|
|
|
|
- name: Restart etcd-events if necessary
|
|
|
|
command: /bin/true
|
2023-07-26 22:36:22 +08:00
|
|
|
notify: Restart etcd-events
|
2022-03-12 10:08:23 +08:00
|
|
|
when:
|
|
|
|
- etcd_events_cluster_setup
|
2023-07-05 11:36:54 +08:00
|
|
|
- etcd_image_tag not in etcd_events_current_docker_image.stdout | default('')
|
2022-03-12 10:08:23 +08:00
|
|
|
|
2018-02-13 00:34:01 +08:00
|
|
|
- name: Install etcd launch script
|
|
|
|
template:
|
|
|
|
src: etcd.j2
|
|
|
|
dest: "{{ bin_dir }}/etcd"
|
|
|
|
owner: 'root'
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0750"
|
2024-08-28 13:30:56 +08:00
|
|
|
backup: true
|
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'
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0750"
|
2024-08-28 13:30:56 +08:00
|
|
|
backup: true
|
2018-03-01 16:39:14 +08:00
|
|
|
when: etcd_events_cluster_setup
|