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.

44 lines
873 B

  1. ---
  2. - name: restart etcd
  3. command: /bin/true
  4. notify:
  5. - reload systemd
  6. - start etcd
  7. - reload etcd
  8. - name: restart etcd-proxy
  9. command: /bin/true
  10. notify:
  11. - reload systemd
  12. - start etcd-proxy
  13. - reload etcd-proxy
  14. - name: reload systemd
  15. command: systemctl daemon-reload
  16. when: ansible_service_mgr == "systemd"
  17. - name: start etcd
  18. service:
  19. name: etcd
  20. enabled: yes
  21. state: started
  22. when: is_etcd_master
  23. - name: start etcd-proxy
  24. service:
  25. name: etcd-proxy
  26. enabled: yes
  27. state: started
  28. when: is_etcd_proxy
  29. - name: reload etcd
  30. service:
  31. name: etcd
  32. state: "{{ 'restarted' if etcd_deployment_type == 'host' else 'reloaded' }}"
  33. when: is_etcd_master
  34. - name: reload etcd-proxy
  35. service:
  36. name: etcd-proxy
  37. state: "{{ 'restarted' if etcd_deployment_type == 'host' else 'reloaded' }}"
  38. when: is_etcd_proxy