You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
666 B

  1. ---
  2. - name: restart etcd
  3. command: /bin/true
  4. notify:
  5. - Backup etcd data
  6. - etcd | reload systemd
  7. - reload etcd
  8. - wait for etcd up
  9. - include: backup.yml
  10. - name: etcd | reload systemd
  11. command: systemctl daemon-reload
  12. - name: reload etcd
  13. service:
  14. name: etcd
  15. state: restarted
  16. when: is_etcd_master
  17. - name: wait for etcd up
  18. uri:
  19. url: "https://{% if is_etcd_master %}{{ etcd_address }}{% else %}127.0.0.1{% endif %}:2379/health"
  20. validate_certs: no
  21. register: result
  22. until: result.status is defined and result.status == 200
  23. retries: 10
  24. delay: 5
  25. - name: set etcd_secret_changed
  26. set_fact:
  27. etcd_secret_changed: true