main.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. ---
  2. # Determine the openshift_version to configure if none has been specified or set previously.
  3. - set_fact:
  4. is_containerized: "{{ openshift.common.is_containerized | default(False) | bool }}"
  5. - debug: var=openshift_version
  6. - debug: var=openshift_release
  7. - debug: var=openshift_pkg_version
  8. - debug: var=openshift_image_tag
  9. # Protect the installed version by default unless explicitly told not to, or given an
  10. # openshift_version already.
  11. - name: Use openshift.common.version fact as version to configure if already installed
  12. set_fact:
  13. openshift_version: "{{ openshift.common.version }}"
  14. when: openshift.common.version is defined and openshift_version is not defined and openshift_protect_installed_version
  15. - name: Set openshift_version for rpm installation
  16. include: set_version_rpm.yml
  17. when: not is_containerized
  18. - name: Set openshift_version for containerized installation
  19. include: set_version_containerized.yml
  20. when: is_containerized
  21. - debug: var=openshift_version
  22. # At this point we know openshift_version is set appropriately. Now we set
  23. # openshift_image_tag and openshift_pkg_version, so all roles can always assume
  24. # each of this variables *will* be set correctly and can use them per their
  25. # intended purpose.