---

- name: Install openshift packages
  package:
    name: "{{ l_node_packages | join(',') }}"
    update_cache: true
  register: install_openshift
  until: install_openshift.rc == 0
  retries: 3
  delay: 1
  vars:
    l_node_packages:
    #- "atomic-openshift-node{{ (openshift_pkg_version | default('')) | lib_utils_oo_image_tag_to_rpm_version(include_dash=True) }}"
    #- "atomic-openshift-clients{{ (openshift_pkg_version | default('')) | lib_utils_oo_image_tag_to_rpm_version(include_dash=True) }}"
    #- "atomic-openshift-hyperkube{{ (openshift_pkg_version | default('')) | lib_utils_oo_image_tag_to_rpm_version(include_dash=True) }}"
    - "origin-node{{ (openshift_pkg_version | default('')) | lib_utils_oo_image_tag_to_rpm_version(include_dash=True) }}"
    - "origin-clients{{ (openshift_pkg_version | default('')) | lib_utils_oo_image_tag_to_rpm_version(include_dash=True) }}"
    - "origin-hyperkube{{ (openshift_pkg_version | default('')) | lib_utils_oo_image_tag_to_rpm_version(include_dash=True) }}"

---

- name: Install openshift packages
  package:
    name: "{{ l_node_packages | join(',') }}"
    update_cache: true
  register: install_openshift
  until: install_openshift.rc == 0
  retries: 3
  delay: 1
  vars:
    l_node_packages:
    - "{{ openshift_service_type }}-node{{ (openshift_pkg_version | default('')) | lib_utils_oo_image_tag_to_rpm_version(include_dash=True) }}"
    - "{{ openshift_service_type }}-clients{{ (openshift_pkg_version | default('')) | lib_utils_oo_image_tag_to_rpm_version(include_dash=True) }}"
    - "{{ openshift_service_type }}-hyperkube{{ (openshift_pkg_version | default('')) | lib_utils_oo_image_tag_to_rpm_version(include_dash=True) }}"

Install node package names based on openshift_release
Install node package names based on openshift_release

Previously, the packages to be installed were hard coded for origin. As
a result, there was no way of installing the openshift-enterprise
packages. This was a regression from 3.x behavior.

This patch uses the openshift_service_type variable to determine which
packages are to be installed based on the value of openshift_release.
