main.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. # Make sure we copy this to a fact if given a var:
  6. - set_fact:
  7. openshift_version: "{{ openshift_version }}"
  8. when: openshift_version is defined
  9. - debug: var=openshift_version
  10. - debug: var=openshift_release
  11. - debug: var=openshift_pkg_version
  12. - debug: var=openshift_image_tag
  13. # Protect the installed version by default unless explicitly told not to, or given an
  14. # openshift_version already.
  15. - name: Use openshift.common.version fact as version to configure if already installed
  16. set_fact:
  17. openshift_version: "{{ openshift.common.version }}"
  18. when: openshift.common.version is defined and openshift_version is not defined and openshift_protect_installed_version
  19. - name: Set openshift_version for rpm installation
  20. include: set_version_rpm.yml
  21. when: not is_containerized
  22. - name: Set openshift_version for containerized installation
  23. include: set_version_containerized.yml
  24. when: is_containerized
  25. - debug: var=openshift_version
  26. # At this point we know openshift_version is set appropriately. Now we set
  27. # openshift_image_tag and openshift_pkg_version, so all roles can always assume
  28. # each of this variables *will* be set correctly and can use them per their
  29. # intended purpose.