upgrade.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. vars:
  33. master_config_hook: "v3_7/master_config_upgrade.yml"
  34. # All controllers must be stopped at the same time then restarted
  35. - name: Cycle all controller services to force new leader election mode
  36. hosts: oo_masters_to_config
  37. gather_facts: no
  38. roles:
  39. - role: openshift_facts
  40. tasks:
  41. - name: Stop {{ openshift_service_type }}-master-controllers
  42. systemd:
  43. name: "{{ openshift_service_type }}-master-controllers"
  44. state: stopped
  45. - name: Start {{ openshift_service_type }}-master-controllers
  46. systemd:
  47. name: "{{ openshift_service_type }}-master-controllers"
  48. state: started
  49. - import_playbook: ../upgrade_nodes.yml
  50. - import_playbook: ../post_control_plane.yml