c12s-kubespray/roles/etcd/handlers/main.yml
Matthew Mosesohn 2f1f7a492d Fix etcd standalone deployment
etcd facts are generated in kubernetes/preinstall, so etcd nodes need
to be evaluated first before the rest of the deployment.

Moved several directory facts from kubernetes/node to
kubernetes/preinstall because they are not backward dependent.
2016-07-26 18:15:06 +03:00

37 lines
742 B
YAML

---
- name: restart etcd
command: /bin/true
notify:
- reload systemd
- reload etcd
- wait for etcd up
- name: restart etcd-proxy
command: /bin/true
notify:
- reload systemd
- reload etcd-proxy
- wait for etcd up
- name: reload systemd
command: systemctl daemon-reload
when: ansible_service_mgr == "systemd"
- name: wait for etcd up
uri: url="http://{% if is_etcd_master %}{{ etcd_address }}{% else %}127.0.0.1{% endif %}:2379/health"
register: result
until: result.status == 200
retries: 10
delay: 5
- name: reload etcd
service:
name: etcd
state: restarted
when: is_etcd_master
- name: reload etcd-proxy
service:
name: etcd-proxy
state: restarted
when: is_etcd_proxy