c12s-kubespray/roles/etcd/handlers/main.yml

35 lines
823 B
YAML
Raw Normal View History

---
2016-01-25 01:01:25 +00:00
- name: restart etcd
command: /bin/true
notify:
- Backup etcd data
- etcd | reload systemd
2016-01-25 01:01:25 +00:00
- reload etcd
- wait for etcd up
- import_tasks: backup.yml
- name: etcd | reload systemd
command: systemctl daemon-reload
- name: reload etcd
service:
name: etcd
state: restarted
when: is_etcd_master
- name: wait for etcd up
uri:
url: "https://{% if is_etcd_master %}{{ etcd_address }}{% else %}127.0.0.1{% endif %}:2379/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
retries: 10
delay: 5
2016-11-09 10:44:41 +00:00
- name: set etcd_secret_changed
set_fact:
etcd_secret_changed: true