etcd.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ---
  2. - name: Backup and remove generated etcd certificates
  3. hosts: oo_first_etcd
  4. any_errors_fatal: true
  5. tasks:
  6. - include_role:
  7. name: etcd
  8. tasks_from: backup_generated_certificates
  9. - include_role:
  10. name: etcd
  11. tasks_from: remove_generated_certificates
  12. - name: Backup and removed deployed etcd certificates
  13. hosts: oo_etcd_to_config
  14. any_errors_fatal: true
  15. tasks:
  16. - include_role:
  17. name: etcd
  18. tasks_from: backup_server_certificates
  19. vars:
  20. r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
  21. - name: Redeploy etcd certificates
  22. hosts: oo_etcd_to_config
  23. any_errors_fatal: true
  24. roles:
  25. - role: openshift_etcd_facts
  26. tasks:
  27. - include_role:
  28. name: etcd
  29. tasks_from: server_certificates
  30. vars:
  31. etcd_certificates_redeploy: true
  32. etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
  33. etcd_peers: "{{ groups.oo_etcd_to_config | default([], true) }}"
  34. etcd_certificates_etcd_hosts: "{{ groups.oo_etcd_to_config | default([], true) }}"
  35. openshift_ca_host: "{{ groups.oo_first_master.0 }}"
  36. r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
  37. - name: Redeploy etcd client certificates for masters
  38. hosts: oo_masters_to_config
  39. any_errors_fatal: true
  40. roles:
  41. - role: openshift_etcd_facts
  42. - role: openshift_etcd_client_certificates
  43. etcd_certificates_redeploy: true
  44. etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}"
  45. etcd_cert_subdir: "openshift-master-{{ openshift.common.hostname }}"
  46. etcd_cert_config_dir: "{{ openshift.common.config_base }}/master"
  47. etcd_cert_prefix: "master.etcd-"
  48. openshift_ca_host: "{{ groups.oo_first_master.0 }}"
  49. openshift_master_count: "{{ openshift.master.master_count | default(groups.oo_masters | length) }}"
  50. r_etcd_common_etcd_runtime: "{{ openshift.common.etcd_runtime }}"
  51. when: groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config