summaryrefslogtreecommitdiffstats
path: root/roles/openshift_version/tasks
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-12-18 16:13:36 -0500
committerMichael Gugino <mgugino@redhat.com>2017-12-20 10:13:51 -0500
commite6c159afb4ba39a7266c750d43d6a5e911cc8f21 (patch)
tree99cb6240e59a7118b2b4c9be603efc7eaeaf4679 /roles/openshift_version/tasks
parenta5de165b8e7113631a30ef0e4a20b5f74db073f0 (diff)
downloadopenshift-e6c159afb4ba39a7266c750d43d6a5e911cc8f21.tar.gz
openshift-e6c159afb4ba39a7266c750d43d6a5e911cc8f21.tar.bz2
openshift-e6c159afb4ba39a7266c750d43d6a5e911cc8f21.tar.xz
openshift-e6c159afb4ba39a7266c750d43d6a5e911cc8f21.zip
Remove openshift.common.{is_atomic|is_containerized}
We set these variables using facts in init, no need to duplicate the logic all around the codebase.
Diffstat (limited to 'roles/openshift_version/tasks')
-rw-r--r--roles/openshift_version/tasks/main.yml20
1 files changed, 8 insertions, 12 deletions
diff --git a/roles/openshift_version/tasks/main.yml b/roles/openshift_version/tasks/main.yml
index e50d5371e..97e58ffac 100644
--- a/roles/openshift_version/tasks/main.yml
+++ b/roles/openshift_version/tasks/main.yml
@@ -1,10 +1,6 @@
---
# Determine the openshift_version to configure if none has been specified or set previously.
-- set_fact:
- is_containerized: "{{ openshift.common.is_containerized | default(False) | bool }}"
- is_atomic: "{{ openshift.common.is_atomic | default(False) | bool }}"
-
# Block attempts to install origin without specifying some kind of version information.
# This is because the latest tags for origin are usually alpha builds, which should not
# be used by default. Users must indicate what they want.
@@ -16,7 +12,7 @@
component images to use. You may want the latest (usually alpha) releases or
a more stable release. (Suggestion: add openshift_release="x.y" to inventory.)
when:
- - is_containerized | bool
+ - openshift_is_containerized | bool
- openshift.common.deployment_type == 'origin'
- openshift_release is not defined
- openshift_image_tag is not defined
@@ -94,11 +90,11 @@
block:
- name: Set openshift_version for rpm installation
include_tasks: set_version_rpm.yml
- when: not is_containerized | bool
+ when: not openshift_is_containerized | bool
- name: Set openshift_version for containerized installation
include_tasks: set_version_containerized.yml
- when: is_containerized | bool
+ when: openshift_is_containerized | bool
- block:
- name: Get available {{ openshift_service_type}} version
@@ -121,8 +117,8 @@
- openshift_pkg_version is not defined
- openshift_image_tag is not defined
when:
- - is_containerized | bool
- - not is_atomic | bool
+ - openshift_is_containerized | bool
+ - not openshift_is_atomic | bool
# Warn if the user has provided an openshift_image_tag but is not doing a containerized install
# NOTE: This will need to be modified/removed for future container + rpm installations work.
@@ -132,7 +128,7 @@
openshift_image_tag is used for containerized installs. If you are trying to
specify an image for a non-container install see oreg_url or oreg_url_master or oreg_url_node.
when:
- - not is_containerized | bool
+ - not openshift_is_containerized | bool
- openshift_image_tag is defined
# At this point we know openshift_version is set appropriately. Now we set
@@ -182,14 +178,14 @@
msg: "No OpenShift version available; please ensure your systems are fully registered and have access to appropriate yum repositories."
name: Abort if openshift_pkg_version was not set
when:
- - not is_containerized | bool
+ - not openshift_is_containerized | bool
- openshift_version == '0.0'
# We can't map an openshift_release to full rpm version like we can with containers; make sure
# the rpm version we looked up matches the release requested and error out if not.
- name: For an RPM install, abort when the release requested does not match the available version.
when:
- - not is_containerized | bool
+ - not openshift_is_containerized | bool
- openshift_release is defined
assert:
that: