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.

54 lines
1.5 KiB

9 years ago
  1. ---
  2. - include: pre_upgrade.yml
  3. tags: etcd-pre-upgrade
  4. - include: check_certs.yml
  5. when: cert_management == "script"
  6. tags: [etcd-secrets, facts]
  7. - include: gen_certs_script.yml
  8. when: cert_management == "script"
  9. tags: etcd-secrets
  10. - include: sync_etcd_master_certs.yml
  11. when: cert_management == "vault" and inventory_hostname in groups.etcd
  12. tags: etcd-secrets
  13. - include: sync_etcd_node_certs.yml
  14. when: cert_management == "vault" and inventory_hostname in etcd_node_cert_hosts
  15. tags: etcd-secrets
  16. - include: gen_certs_vault.yml
  17. when: cert_management == "vault" and (etcd_master_certs_needed|d() or etcd_node_certs_needed|d())
  18. tags: etcd-secrets
  19. - include: "install_{{ etcd_deployment_type }}.yml"
  20. when: is_etcd_master
  21. tags: upgrade
  22. - include: set_cluster_health.yml
  23. when: is_etcd_master
  24. - include: configure.yml
  25. when: is_etcd_master
  26. - include: refresh_config.yml
  27. when: is_etcd_master
  28. - name: Restart etcd if binary or certs changed
  29. command: /bin/true
  30. notify: restart etcd
  31. when: etcd_deployment_type == "host" and etcd_copy.stdout_lines and is_etcd_master
  32. or etcd_secret_changed|default(false)
  33. # reload-systemd
  34. - meta: flush_handlers
  35. - name: Ensure etcd is running
  36. service:
  37. name: etcd
  38. state: started
  39. enabled: yes
  40. when: is_etcd_master
  41. # After etcd cluster is assembled, make sure that
  42. # initial state of the cluster is in `existing`
  43. # state insted of `new`.
  44. - include: set_cluster_health.yml
  45. when: is_etcd_master
  46. - include: refresh_config.yml
  47. when: is_etcd_master