upgrade.yml 1.8 KB

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