upgrade.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ---
  2. - include_tasks: upgrade/rpm_upgrade.yml
  3. when: not openshift_is_containerized | bool
  4. - include_tasks: upgrade/upgrade_scheduler.yml
  5. # master_config_hook is passed in from upgrade play.
  6. - include_tasks: "upgrade/{{ master_config_hook }}"
  7. when: master_config_hook is defined
  8. - include_tasks: systemd_units.yml
  9. - include_tasks: set_loopback_context.yml
  10. - name: Check for ca-bundle.crt
  11. stat:
  12. path: "{{ openshift.common.config_base }}/master/ca-bundle.crt"
  13. register: ca_bundle_stat
  14. failed_when: false
  15. - name: Check for ca.crt
  16. stat:
  17. path: "{{ openshift.common.config_base }}/master/ca.crt"
  18. register: ca_crt_stat
  19. failed_when: false
  20. - name: Migrate ca.crt to ca-bundle.crt
  21. command: mv ca.crt ca-bundle.crt
  22. args:
  23. chdir: "{{ openshift.common.config_base }}/master"
  24. when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists
  25. - name: Link ca.crt to ca-bundle.crt
  26. file:
  27. src: "{{ openshift.common.config_base }}/master/ca-bundle.crt"
  28. path: "{{ openshift.common.config_base }}/master/ca.crt"
  29. state: link
  30. when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists
  31. - name: Update oreg value
  32. yedit:
  33. src: "{{ openshift.common.config_base }}/master/master-config.yaml"
  34. key: 'imageConfig.format'
  35. value: "{{ oreg_url | default(oreg_url_master) }}"
  36. when: oreg_url is defined or oreg_url_master is defined
  37. - name: Change default node selector to compute=true
  38. yedit:
  39. src: "{{ openshift.common.config_base }}/master/master-config.yaml"
  40. key: 'projectConfig.defaultNodeSelector'
  41. value: '{{ hostvars[groups.oo_first_master.0].l_osm_default_node_selector }}'
  42. when: openshift_upgrade_target | version_compare('3.9', '>=')