diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2016-06-06 11:47:50 -0300 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2016-06-06 11:47:50 -0300 |
commit | 88839ab89210ecd3d20d1f10f8f03bf0a801502a (patch) | |
tree | f0816491f80f7ac5839259323785782e222f66a3 /roles/openshift_version/tasks | |
parent | 81cb935e1817df4c633397680e963d635ed42e26 (diff) | |
download | openshift-88839ab89210ecd3d20d1f10f8f03bf0a801502a.tar.gz openshift-88839ab89210ecd3d20d1f10f8f03bf0a801502a.tar.bz2 openshift-88839ab89210ecd3d20d1f10f8f03bf0a801502a.tar.xz openshift-88839ab89210ecd3d20d1f10f8f03bf0a801502a.zip |
Do not install rpm for version in openshift_version role.
Diffstat (limited to 'roles/openshift_version/tasks')
-rw-r--r-- | roles/openshift_version/tasks/set_version_containerized.yml | 1 | ||||
-rw-r--r-- | roles/openshift_version/tasks/set_version_rpm.yml | 19 |
2 files changed, 9 insertions, 11 deletions
diff --git a/roles/openshift_version/tasks/set_version_containerized.yml b/roles/openshift_version/tasks/set_version_containerized.yml index f3eab4831..fc15b2d35 100644 --- a/roles/openshift_version/tasks/set_version_containerized.yml +++ b/roles/openshift_version/tasks/set_version_containerized.yml @@ -22,7 +22,6 @@ when: openshift_version is not defined - debug: msg="{{ openshift_version }}" -#- debug: var=openshift_version.split('.') # If we got an openshift_version like "3.2", lookup the latest 3.2 container version # and use that value instead. diff --git a/roles/openshift_version/tasks/set_version_rpm.yml b/roles/openshift_version/tasks/set_version_rpm.yml index b201f24d8..bcf275135 100644 --- a/roles/openshift_version/tasks/set_version_rpm.yml +++ b/roles/openshift_version/tasks/set_version_rpm.yml @@ -7,17 +7,16 @@ openshift_version: "{{ openshift_pkg_version[1:].split('-')[0] }}" when: openshift_pkg_version is defined and openshift_version is not defined -# We do not have as fine grained control over version to install presently with rpms, -# we just assume the user has configured the correct repos and install the rpm requested. -- name: Install latest rpm available in configured repos to check version - action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}{{ openshift_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }} state=present" +- name: Gather common package version + command: > + {{ repoquery_cmd }} --qf '%{version}' "{{ openshift.common.service_type}}" + register: common_version + failed_when: false + changed_when: false when: openshift_version is not defined -- name: Reload facts to pick up version - openshift_facts: - when: openshift_version is not defined +- debug: var=common_version -- name: Set rpm version to configure to latest available in repos - set_fact: - openshift_version: "{{ openshift.common.version }}" +- set_fact: + openshift_version: "{{ common_version.stdout | default('0.0', True) }}" when: openshift_version is not defined |