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:
|
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
|
|
|
|
2016-07-11 22:05:05 +08:00
|
|
|
- name: restart etcd-proxy
|
|
|
|
command: /bin/true
|
|
|
|
notify:
|
2016-07-29 17:46:24 +08:00
|
|
|
- etcd | reload systemd
|
2016-07-11 22:05:05 +08:00
|
|
|
- reload etcd-proxy
|
2016-07-19 21:45:37 +08:00
|
|
|
- wait for etcd up
|
2016-07-11 22:05:05 +08:00
|
|
|
|
2016-07-29 17:46:24 +08:00
|
|
|
- name: etcd | reload systemd
|
2016-01-19 22:23:19 +08:00
|
|
|
command: systemctl daemon-reload
|
2016-02-13 18:17:20 +08:00
|
|
|
when: ansible_service_mgr == "systemd"
|
2016-01-19 22:23:19 +08:00
|
|
|
|
2016-07-19 21:45:37 +08:00
|
|
|
- name: wait for etcd up
|
2016-07-26 21:18:47 +08:00
|
|
|
uri: url="http://{% if is_etcd_master %}{{ etcd_address }}{% else %}127.0.0.1{% endif %}:2379/health"
|
2016-07-19 21:45:37 +08:00
|
|
|
register: result
|
|
|
|
until: result.status == 200
|
|
|
|
retries: 10
|
|
|
|
delay: 5
|
2016-06-24 20:25:16 +08:00
|
|
|
|
2016-01-25 09:01:25 +08:00
|
|
|
- name: reload etcd
|
2016-01-19 22:23:19 +08:00
|
|
|
service:
|
|
|
|
name: etcd
|
2016-07-19 21:45:37 +08:00
|
|
|
state: restarted
|
2016-07-11 22:05:05 +08:00
|
|
|
when: is_etcd_master
|
|
|
|
|
|
|
|
- name: reload etcd-proxy
|
|
|
|
service:
|
|
|
|
name: etcd-proxy
|
2016-07-19 21:45:37 +08:00
|
|
|
state: restarted
|
2016-07-11 22:05:05 +08:00
|
|
|
when: is_etcd_proxy
|