2016-01-19 22:23:19 +08:00
|
|
|
---
|
2016-01-25 09:01:25 +08:00
|
|
|
- name: restart etcd
|
2016-01-19 22:23:19 +08:00
|
|
|
command: /bin/true
|
|
|
|
notify:
|
2017-03-17 03:38:13 +08:00
|
|
|
- Backup etcd data
|
2016-07-29 17:46:24 +08:00
|
|
|
- etcd | reload systemd
|
2016-01-25 09:01:25 +08:00
|
|
|
- reload etcd
|
2016-07-19 21:45:37 +08:00
|
|
|
- wait for etcd up
|
2016-01-19 22:23:19 +08:00
|
|
|
|
2018-03-01 16:39:14 +08:00
|
|
|
- name: restart etcd-events
|
|
|
|
command: /bin/true
|
|
|
|
notify:
|
2018-04-02 00:58:08 +08:00
|
|
|
- etcd | reload systemd
|
2018-03-01 16:39:14 +08:00
|
|
|
- reload etcd-events
|
|
|
|
- wait for etcd-events up
|
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- import_tasks: backup.yml
|
2017-03-17 03:38:13 +08:00
|
|
|
|
2016-07-29 17:46:24 +08:00
|
|
|
- name: etcd | reload systemd
|
2019-04-24 13:18:00 +08:00
|
|
|
systemd:
|
|
|
|
daemon_reload: true
|
2016-01-19 22:23:19 +08:00
|
|
|
|
2016-11-19 06:08:19 +08:00
|
|
|
- name: reload etcd
|
|
|
|
service:
|
|
|
|
name: etcd
|
|
|
|
state: restarted
|
|
|
|
when: is_etcd_master
|
|
|
|
|
2018-03-01 16:39:14 +08:00
|
|
|
- name: reload etcd-events
|
|
|
|
service:
|
|
|
|
name: etcd-events
|
|
|
|
state: restarted
|
|
|
|
when: is_etcd_master
|
|
|
|
|
2016-07-19 21:45:37 +08:00
|
|
|
- name: wait for etcd up
|
2017-02-18 05:22:34 +08:00
|
|
|
uri:
|
|
|
|
url: "https://{% if is_etcd_master %}{{ etcd_address }}{% else %}127.0.0.1{% endif %}:2379/health"
|
|
|
|
validate_certs: no
|
2017-11-07 22:06:16 +08:00
|
|
|
client_cert: "{{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem"
|
|
|
|
client_key: "{{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem"
|
2016-07-19 21:45:37 +08:00
|
|
|
register: result
|
2016-11-09 18:31:12 +08:00
|
|
|
until: result.status is defined and result.status == 200
|
2019-04-24 15:08:05 +08:00
|
|
|
retries: 60
|
|
|
|
delay: 1
|
2016-06-24 20:25:16 +08:00
|
|
|
|
2018-03-01 16:39:14 +08:00
|
|
|
- name: wait for etcd-events up
|
|
|
|
uri:
|
|
|
|
url: "https://{% if is_etcd_master %}{{ etcd_address }}{% else %}127.0.0.1{% endif %}:2381/health"
|
|
|
|
validate_certs: no
|
|
|
|
client_cert: "{{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem"
|
|
|
|
client_key: "{{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem"
|
|
|
|
register: result
|
|
|
|
until: result.status is defined and result.status == 200
|
2019-04-24 15:08:05 +08:00
|
|
|
retries: 60
|
|
|
|
delay: 1
|
2018-03-01 16:39:14 +08:00
|
|
|
|
2016-11-09 18:44:41 +08:00
|
|
|
- name: set etcd_secret_changed
|
|
|
|
set_fact:
|
|
|
|
etcd_secret_changed: true
|