upgrade.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. - import_playbook: validator.yml
  22. - name: Flag pre-upgrade checks complete for hosts without errors
  23. hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config
  24. tasks:
  25. - set_fact:
  26. pre_upgrade_complete: True
  27. # Pre-upgrade completed
  28. - import_playbook: ../upgrade_control_plane.yml
  29. # All controllers must be stopped at the same time then restarted
  30. - name: Cycle all controller services to force new leader election mode
  31. hosts: oo_masters_to_config
  32. gather_facts: no
  33. roles:
  34. - role: openshift_facts
  35. tasks:
  36. - name: Stop {{ openshift_service_type }}-master-controllers
  37. systemd:
  38. name: "{{ openshift_service_type }}-master-controllers"
  39. state: stopped
  40. - name: Start {{ openshift_service_type }}-master-controllers
  41. systemd:
  42. name: "{{ openshift_service_type }}-master-controllers"
  43. state: started
  44. - import_playbook: ../upgrade_nodes.yml
  45. - import_playbook: ../post_control_plane.yml