initialize_openshift_version.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ---
  2. # NOTE: requires openshift_facts be run
  3. - name: Verify compatible yum/subscription-manager combination
  4. hosts: l_oo_all_hosts
  5. gather_facts: no
  6. tasks:
  7. # See:
  8. # https://bugzilla.redhat.com/show_bug.cgi?id=1395047
  9. # https://bugzilla.redhat.com/show_bug.cgi?id=1282961
  10. # https://github.com/openshift/openshift-ansible/issues/1138
  11. - name: Check for bad combinations of yum and subscription-manager
  12. command: >
  13. {{ repoquery_cmd }} --installed --qf '%{version}' "yum"
  14. register: yum_ver_test
  15. changed_when: false
  16. when: not openshift.common.is_atomic | bool
  17. - fail:
  18. msg: Incompatible versions of yum and subscription-manager found. You may need to update yum and yum-utils.
  19. when: "not openshift.common.is_atomic | bool and 'Plugin \"search-disabled-repos\" requires API 2.7. Supported API is 2.6.' in yum_ver_test.stdout"
  20. - include: disable_excluder.yml
  21. vars:
  22. # the excluders needs to be disabled no matter what status says
  23. with_status_check: false
  24. tags:
  25. - always
  26. - name: Determine openshift_version to configure on first master
  27. hosts: oo_first_master
  28. roles:
  29. - openshift_version
  30. # NOTE: We set this even on etcd hosts as they may also later run as masters,
  31. # and we don't want to install wrong version of docker and have to downgrade
  32. # later.
  33. - name: Set openshift_version for all hosts
  34. hosts: oo_all_hosts:!oo_first_master
  35. vars:
  36. openshift_version: "{{ hostvars[groups.oo_first_master.0].openshift_version }}"
  37. roles:
  38. - openshift_version