restart.yml 451 B

123456789101112131415161718192021
  1. ---
  2. - name: restart etcd
  3. service:
  4. name: "{{ etcd_service }}"
  5. state: restarted
  6. when:
  7. - not g_etcd_certificates_expired | default(false) | bool
  8. - name: stop etcd
  9. service:
  10. name: "{{ etcd_service }}"
  11. state: stopped
  12. when:
  13. - g_etcd_certificates_expired | default(false) | bool
  14. - name: start etcd
  15. service:
  16. name: "{{ etcd_service }}"
  17. state: started
  18. when:
  19. - g_etcd_certificates_expired | default(false) | bool