diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2016-05-26 14:30:37 -0300 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2016-05-26 14:30:37 -0300 |
commit | 14b23a8b14636407143375cbac71b090663cee77 (patch) | |
tree | d81974e9cd0d4e2a2cef4b2bfef697835a0179aa /roles/openshift_docker/tasks | |
parent | c45ccc0ee879e93a4fd4304b4848595fa27014c5 (diff) | |
download | openshift-14b23a8b14636407143375cbac71b090663cee77.tar.gz openshift-14b23a8b14636407143375cbac71b090663cee77.tar.bz2 openshift-14b23a8b14636407143375cbac71b090663cee77.tar.xz openshift-14b23a8b14636407143375cbac71b090663cee77.zip |
Get rpm installations functional again.
Diffstat (limited to 'roles/openshift_docker/tasks')
-rw-r--r-- | roles/openshift_docker/tasks/main.yml | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/roles/openshift_docker/tasks/main.yml b/roles/openshift_docker/tasks/main.yml index 1791d20c0..c7b8f504a 100644 --- a/roles/openshift_docker/tasks/main.yml +++ b/roles/openshift_docker/tasks/main.yml @@ -2,12 +2,34 @@ # It's important that we don't explicitly pull this image here. Otherwise we # could result in upgrading a preinstalled environment. We'll have to set # openshift_image_tag correctly for upgrades. + +# Determine openshift_version if none is set for this host, or if a generic "3.2" +# is set, determine the more specific version number by either installing the latest +# rpm, or pulling the v3.2 container and checking the resulting versions. + - set_fact: is_containerized: "{{ openshift.common.is_containerized | default(False) | bool }}" -# If no openshift_version provided, figure out what to use: -# TODO: May want to move this to another role. -- name: Lookup latest OpenShift version if none specified +- debug: var=openshift_version + +# RPM openshift_version setup: +- debug: msg="{{ openshift_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }}" +- name: Lookup latest OpenShift rpm version if none specified + action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}{{ openshift_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }} state=present" + when: not is_containerized | bool and openshift_version is not defined + +- name: Reload facts to pick up version + openshift_facts: + when: not is_containerized | bool and openshift_version is not defined + +- set_fact: + openshift_version: "{{ openshift.common.version }}" + when: not is_containerized | bool and openshift_version is not defined + +# TODO: What to do if openshift_version = 3.2 for rpm based installs? + +# Containerized openshift_version setup: +- name: Lookup latest containerized OpenShift version if none specified command: > docker run --rm {{ openshift.common.cli_image }}:latest version register: cli_image_version |