diff options
author | Michael Gugino <mgugino@redhat.com> | 2017-11-27 15:39:46 -0500 |
---|---|---|
committer | Michael Gugino <mgugino@redhat.com> | 2017-12-07 14:37:36 -0500 |
commit | eb6b20fc9183cc2aae424c72efd1191b99110a93 (patch) | |
tree | ae3dec3c4b4581471f3de0afd8a1711235242cc6 /roles/openshift_version | |
parent | 37ffebc86cd4fe89373542285b40d92f61696270 (diff) | |
download | openshift-eb6b20fc9183cc2aae424c72efd1191b99110a93.tar.gz openshift-eb6b20fc9183cc2aae424c72efd1191b99110a93.tar.bz2 openshift-eb6b20fc9183cc2aae424c72efd1191b99110a93.tar.xz openshift-eb6b20fc9183cc2aae424c72efd1191b99110a93.zip |
Remove openshift.common.service_type
This commit removes openshift.common.service_type
in favor of openshift_service_type.
This commit also removes r_openshift_excluder_service_type
from plays in favor of using the role's defaults.
Diffstat (limited to 'roles/openshift_version')
-rw-r--r-- | roles/openshift_version/defaults/main.yml | 6 | ||||
-rw-r--r-- | roles/openshift_version/tasks/main.yml | 8 | ||||
-rw-r--r-- | roles/openshift_version/tasks/set_version_rpm.yml | 6 |
3 files changed, 13 insertions, 7 deletions
diff --git a/roles/openshift_version/defaults/main.yml b/roles/openshift_version/defaults/main.yml index 01a1a7472..4adf04e90 100644 --- a/roles/openshift_version/defaults/main.yml +++ b/roles/openshift_version/defaults/main.yml @@ -1,2 +1,8 @@ --- openshift_protect_installed_version: True + +openshift_service_type_dict: + origin: origin + openshift-enterprise: atomic-openshift + +openshift_service_type: "{{ openshift_service_type_dict[openshift_deployment_type] }}" diff --git a/roles/openshift_version/tasks/main.yml b/roles/openshift_version/tasks/main.yml index 4f9158ade..ae0f68a5b 100644 --- a/roles/openshift_version/tasks/main.yml +++ b/roles/openshift_version/tasks/main.yml @@ -101,13 +101,13 @@ when: is_containerized | bool - block: - - name: Get available {{ openshift.common.service_type}} version + - name: Get available {{ openshift_service_type}} version repoquery: - name: "{{ openshift.common.service_type}}" + name: "{{ openshift_service_type}}" ignore_excluders: true register: rpm_results - fail: - msg: "Package {{ openshift.common.service_type}} not found" + msg: "Package {{ openshift_service_type}} not found" when: not rpm_results.results.package_found - set_fact: openshift_rpm_version: "{{ rpm_results.results.versions.available_versions.0 | default('0.0', True) }}" @@ -196,7 +196,7 @@ - openshift_version.startswith(openshift_release) | bool msg: |- You requested openshift_release {{ openshift_release }}, which is not matched by - the latest OpenShift RPM we detected as {{ openshift.common.service_type }}-{{ openshift_version }} + the latest OpenShift RPM we detected as {{ openshift_service_type }}-{{ openshift_version }} on host {{ inventory_hostname }}. We will only install the latest RPMs, so please ensure you are getting the release you expect. You may need to adjust your Ansible inventory, modify the repositories diff --git a/roles/openshift_version/tasks/set_version_rpm.yml b/roles/openshift_version/tasks/set_version_rpm.yml index c40777bf1..c7ca5ceae 100644 --- a/roles/openshift_version/tasks/set_version_rpm.yml +++ b/roles/openshift_version/tasks/set_version_rpm.yml @@ -8,14 +8,14 @@ - openshift_version is not defined - block: - - name: Get available {{ openshift.common.service_type}} version + - name: Get available {{ openshift_service_type}} version repoquery: - name: "{{ openshift.common.service_type}}" + name: "{{ openshift_service_type}}" ignore_excluders: true register: rpm_results - fail: - msg: "Package {{ openshift.common.service_type}} not found" + msg: "Package {{ openshift_service_type}} not found" when: not rpm_results.results.package_found - set_fact: |