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