upgrade.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ---
  2. #
  3. # Full Control Plane + Nodes Upgrade
  4. #
  5. - import_playbook: ../init.yml
  6. tags:
  7. - pre_upgrade
  8. - name: Configure the upgrade target for the common upgrade tasks
  9. hosts: oo_all_hosts
  10. tags:
  11. - pre_upgrade
  12. tasks:
  13. - set_fact:
  14. openshift_upgrade_target: '3.8'
  15. openshift_upgrade_min: '3.7'
  16. - import_playbook: ../pre/config.yml
  17. vars:
  18. l_upgrade_repo_hosts: "oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config:oo_lb_to_config"
  19. l_upgrade_no_proxy_hosts: "oo_masters_to_config:oo_nodes_to_upgrade"
  20. l_upgrade_health_check_hosts: "oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config"
  21. l_upgrade_verify_targets_hosts: "oo_masters_to_config:oo_nodes_to_upgrade"
  22. l_upgrade_docker_target_hosts: "oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config"
  23. l_upgrade_excluder_hosts: "oo_nodes_to_config:oo_masters_to_config"
  24. - import_playbook: validator.yml
  25. - name: Flag pre-upgrade checks complete for hosts without errors
  26. hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config
  27. tasks:
  28. - set_fact:
  29. pre_upgrade_complete: True
  30. # Pre-upgrade completed
  31. - import_playbook: ../upgrade_control_plane.yml
  32. # All controllers must be stopped at the same time then restarted
  33. - name: Cycle all controller services to force new leader election mode
  34. hosts: oo_masters_to_config
  35. gather_facts: no
  36. roles:
  37. - role: openshift_facts
  38. tasks:
  39. - name: Stop {{ openshift_service_type }}-master-controllers
  40. systemd:
  41. name: "{{ openshift_service_type }}-master-controllers"
  42. state: stopped
  43. - name: Start {{ openshift_service_type }}-master-controllers
  44. systemd:
  45. name: "{{ openshift_service_type }}-master-controllers"
  46. state: started
  47. - import_playbook: ../upgrade_nodes.yml
  48. - import_playbook: ../post_control_plane.yml