--- # debating making this a module instead? - fail: msg: Missing version to install provided by 'openshift_logging_elasticsearch_image_version' when: not openshift_logging_elasticsearch_image_version or openshift_logging_elasticsearch_image_version == '' - set_fact: es_version: "{{ __latest_es_version }}" when: openshift_logging_elasticsearch_image_version == 'latest' # should we just assume that we will have the correct major version? - set_fact: es_version="{{ openshift_logging_elasticsearch_image_version | regex_replace('^v?(?P\d)\.(?P\d).*$', '3_\\g') }}" when: - openshift_logging_elasticsearch_image_version != 'latest' - not openshift_logging_es5_techpreview | default(false) | bool - fail: msg: Invalid version specified for Elasticsearch when: - es_version not in __allowed_es_versions - not openshift_logging_es5_techpreview | default(false) | bool - include_tasks: get_es_version.yml