upgrade_pre.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ---
  2. # This is a hack to allow us to update various components without restarting
  3. # services. This will persist into the upgrade play as well, so everything
  4. # needs to be restarted by hand.
  5. - set_fact:
  6. skip_node_svc_handlers: True
  7. - import_tasks: registry_auth.yml
  8. - name: update package meta data to speed install later.
  9. command: "{{ ansible_pkg_mgr }} makecache"
  10. register: result
  11. until: result is succeeded
  12. when: not openshift_is_containerized | bool
  13. - name: Check Docker image count
  14. shell: "docker images -aq | wc -l"
  15. register: docker_image_count
  16. when:
  17. - l_docker_upgrade is defined
  18. - l_docker_upgrade | bool
  19. - debug: var=docker_image_count.stdout
  20. when:
  21. - l_docker_upgrade is defined
  22. - l_docker_upgrade | bool
  23. - import_tasks: upgrade/containerized_upgrade_pull.yml
  24. when: openshift_is_containerized | bool
  25. # Prepull the rpms for docker upgrade, but don't install
  26. - name: download docker upgrade rpm
  27. command: "{{ ansible_pkg_mgr }} install -y --downloadonly docker{{ '-' + docker_version }}"
  28. register: result
  29. until: result is succeeded
  30. when:
  31. - l_docker_upgrade is defined
  32. - l_docker_upgrade | bool
  33. - import_tasks: upgrade/rpm_upgrade.yml
  34. vars:
  35. openshift_version: "{{ openshift_pkg_version | default('') }}"
  36. when: not openshift_is_containerized | bool