c12s-kubespray/roles/etcd/handlers/main.yml
Matthew Mosesohn 40207937f7 Set default etcd deployment to docker
Improved docker reload command to wait for etcd to be
up before proceeding. Switched reload to run restart
because it can't reload if it is not guaranteed to be
in running state.
2016-07-20 18:26:16 +03:00

37 lines
678 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://localhost: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