first_master.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ---
  2. # Determine the openshift_version to configure if none has been specified or set previously.
  3. # Protect the installed version by default unless explicitly told not to, or given an
  4. # openshift_version already.
  5. - name: Use openshift_current_version fact as version to configure if already installed
  6. set_fact:
  7. openshift_version: "{{ openshift_current_version }}"
  8. when:
  9. - openshift_current_version is defined
  10. - openshift_version is not defined or openshift_version == ""
  11. - openshift_protect_installed_version | bool
  12. - name: Set openshift_version to openshift_release if undefined
  13. set_fact:
  14. openshift_version: "{{ openshift_release | default('3.10') }}"
  15. when:
  16. - openshift_version is not defined or openshift_version == ""
  17. - block:
  18. - debug:
  19. msg: "openshift_pkg_version was not defined. Falling back to -{{ openshift_version }}"
  20. - set_fact:
  21. # We append an '*' here because yum is not flexible.
  22. openshift_pkg_version: "-{{ openshift_version }}*"
  23. when:
  24. - openshift_pkg_version is not defined
  25. # When double upgrade is in process, we want to set everything to match
  26. # openshift_verison.
  27. - block:
  28. - debug:
  29. msg: "openshift_image_tag was not defined. Falling back to v{{ openshift_version }}"
  30. - set_fact:
  31. openshift_image_tag: "v{{ openshift_version }}"
  32. when: openshift_image_tag is not defined
  33. # The end result of these three variables is quite important so make sure they are displayed and logged:
  34. - debug: var=openshift_release
  35. - debug: var=openshift_image_tag
  36. - debug: var=openshift_pkg_version
  37. - debug: var=openshift_version