summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-06-17 10:54:14 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-06-17 10:54:14 -0300
commit2cab796e15d834dfb9f3743941dd5311731fc70f (patch)
tree83a068836829cd60fb8b76148867c3ad9f3780f7 /roles
parentdc75bf3a6c7913c519706e69a3ea82efd191b378 (diff)
downloadopenshift-2cab796e15d834dfb9f3743941dd5311731fc70f.tar.gz
openshift-2cab796e15d834dfb9f3743941dd5311731fc70f.tar.bz2
openshift-2cab796e15d834dfb9f3743941dd5311731fc70f.tar.xz
openshift-2cab796e15d834dfb9f3743941dd5311731fc70f.zip
Normalize some of the version inventory vars which users might mistakenly enter wrong.
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_version/tasks/main.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/openshift_version/tasks/main.yml b/roles/openshift_version/tasks/main.yml
index b11bf62fe..ac3efe7e9 100644
--- a/roles/openshift_version/tasks/main.yml
+++ b/roles/openshift_version/tasks/main.yml
@@ -11,6 +11,19 @@
msg: "Must specify openshift_release or openshift_image_tag in inventory to install origin. (suggestion: add openshift_release=\"1.2\" to inventory)"
when: is_containerized | bool and openshift.common.deployment_type == 'origin' and openshift_release is not defined and openshift_image_tag is not defined
+# Normalize some values that we need in a certain format that might be confusing:
+- set_fact:
+ openshift_release: "{{ openshift_release[1:] }}"
+ when: openshift_release is defined and openshift_release[0] == 'v'
+
+- set_fact:
+ openshift_image_tag: "{{ 'v' + openshift_image_tag }}"
+ when: openshift_image_tag is defined and openshift_image_tag[0] != 'v'
+
+- set_fact:
+ openshift_pkg_version: "{{ '-' + openshift_pkg_version }}"
+ when: openshift_pkg_version is defined and openshift_pkg_version[0] != '-'
+
# Make sure we copy this to a fact if given a var:
- set_fact:
openshift_version: "{{ openshift_version }}"