summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging_mux/tasks/determine_version.yaml
diff options
context:
space:
mode:
authorewolinetz <ewolinet@redhat.com>2017-05-02 11:21:56 -0500
committerewolinetz <ewolinet@redhat.com>2017-05-22 10:42:52 -0500
commit60ad4626f03cbfb119290a4bfaf9ecba53dc762b (patch)
tree766cafb64b81d26ba9cad66e84153248aad7141a /roles/openshift_logging_mux/tasks/determine_version.yaml
parenta8e826248539179c5ef69ec003701be608e89b70 (diff)
downloadopenshift-60ad4626f03cbfb119290a4bfaf9ecba53dc762b.tar.gz
openshift-60ad4626f03cbfb119290a4bfaf9ecba53dc762b.tar.bz2
openshift-60ad4626f03cbfb119290a4bfaf9ecba53dc762b.tar.xz
openshift-60ad4626f03cbfb119290a4bfaf9ecba53dc762b.zip
Pulling in changes from master
Diffstat (limited to 'roles/openshift_logging_mux/tasks/determine_version.yaml')
-rw-r--r--roles/openshift_logging_mux/tasks/determine_version.yaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/openshift_logging_mux/tasks/determine_version.yaml b/roles/openshift_logging_mux/tasks/determine_version.yaml
new file mode 100644
index 000000000..229bcf3d5
--- /dev/null
+++ b/roles/openshift_logging_mux/tasks/determine_version.yaml
@@ -0,0 +1,17 @@
+---
+# debating making this a module instead?
+- fail:
+ msg: Missing version to install provided by 'openshift_logging_image_version'
+ when: not openshift_logging_image_version or openshift_logging_image_version == ''
+
+- set_fact:
+ mux_version: "{{ __latest_mux_version }}"
+ when: openshift_logging_image_version == 'latest'
+
+# should we just assume that we will have the correct major version?
+- set_fact: mux_version="{{ openshift_logging_image_version | regex_replace('^v?(?P<major>\d)\.(?P<minor>\d).*$', '3_\\g<minor>') }}"
+ when: openshift_logging_image_version != 'latest'
+
+- fail:
+ msg: Invalid version specified for mux
+ when: mux_version not in __allowed_mux_versions