mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-15 22:34:21 +03:00
* project: fix var-spacing ansible rule Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing on the beginning/end of jinja template Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing of default filter Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing between filter arguments Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix double space at beginning/end of jinja Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix remaining jinja[spacing] ansible-lint warning Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> --------- Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
---
|
|
- import_tasks: install_etcdctl_docker.yml
|
|
when: etcd_cluster_setup
|
|
|
|
- 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('')
|
|
|
|
- name: Install etcd launch script
|
|
template:
|
|
src: etcd.j2
|
|
dest: "{{ bin_dir }}/etcd"
|
|
owner: 'root'
|
|
mode: 0750
|
|
backup: yes
|
|
when: etcd_cluster_setup
|
|
|
|
- name: Install etcd-events launch script
|
|
template:
|
|
src: etcd-events.j2
|
|
dest: "{{ bin_dir }}/etcd-events"
|
|
owner: 'root'
|
|
mode: 0750
|
|
backup: yes
|
|
when: etcd_events_cluster_setup
|