initialize_openshift_version.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. ---
  2. # NOTE: requires openshift_facts be run
  3. - hosts: l_oo_all_hosts
  4. gather_facts: no
  5. tasks:
  6. # See:
  7. # https://bugzilla.redhat.com/show_bug.cgi?id=1395047
  8. # https://bugzilla.redhat.com/show_bug.cgi?id=1282961
  9. # https://github.com/openshift/openshift-ansible/issues/1138
  10. - name: Check for bad combinations of yum and subscription-manager
  11. command: >
  12. {{ repoquery_cmd }} --installed --qf '%{version}' "yum"
  13. register: yum_ver_test
  14. changed_when: false
  15. when: not openshift.common.is_atomic | bool
  16. - fail:
  17. msg: Incompatible versions of yum and subscription-manager found. You may need to update yum and yum-utils.
  18. 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"
  19. - name: Determine openshift_version to configure on first master
  20. hosts: oo_first_master
  21. roles:
  22. - openshift_version
  23. # NOTE: We set this even on etcd hosts as they may also later run as masters,
  24. # and we don't want to install wrong version of docker and have to downgrade
  25. # later.
  26. - name: Set openshift_version for all hosts
  27. hosts: oo_all_hosts:!oo_first_master
  28. vars:
  29. openshift_version: "{{ hostvars[groups.oo_first_master.0].openshift_version }}"
  30. roles:
  31. - openshift_version