summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging_elasticsearch
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_logging_elasticsearch')
-rw-r--r--roles/openshift_logging_elasticsearch/defaults/main.yml2
-rw-r--r--roles/openshift_logging_elasticsearch/tasks/determine_version.yaml12
-rw-r--r--roles/openshift_logging_elasticsearch/tasks/main.yaml12
-rw-r--r--roles/openshift_logging_elasticsearch/vars/default_images.yml4
-rw-r--r--roles/openshift_logging_elasticsearch/vars/openshift-enterprise.yml2
5 files changed, 18 insertions, 14 deletions
diff --git a/roles/openshift_logging_elasticsearch/defaults/main.yml b/roles/openshift_logging_elasticsearch/defaults/main.yml
index 9fc6fd1d8..bec4432c3 100644
--- a/roles/openshift_logging_elasticsearch/defaults/main.yml
+++ b/roles/openshift_logging_elasticsearch/defaults/main.yml
@@ -1,7 +1,5 @@
---
### Common settings
-openshift_logging_elasticsearch_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
-openshift_logging_elasticsearch_image_version: "{{ openshift_logging_image_version | default('latest') }}"
openshift_logging_elasticsearch_image_pull_secret: "{{ openshift_hosted_logging_image_pull_secret | default('') }}"
openshift_logging_elasticsearch_namespace: logging
diff --git a/roles/openshift_logging_elasticsearch/tasks/determine_version.yaml b/roles/openshift_logging_elasticsearch/tasks/determine_version.yaml
index 1a952b5cf..c53a06019 100644
--- a/roles/openshift_logging_elasticsearch/tasks/determine_version.yaml
+++ b/roles/openshift_logging_elasticsearch/tasks/determine_version.yaml
@@ -1,18 +1,16 @@
---
# 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 == ''
+ 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_image_version == 'latest'
-
-- debug: var=openshift_logging_image_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_image_version | regex_replace('^v?(?P<major>\d)\.(?P<minor>\d).*$', '3_\\g<minor>') }}"
- when: openshift_logging_image_version != 'latest'
+- set_fact: es_version="{{ openshift_logging_elasticsearch_image_version | regex_replace('^v?(?P<major>\d)\.(?P<minor>\d).*$', '3_\\g<minor>') }}"
+ when: openshift_logging_elasticsearch_image_version != 'latest'
- fail:
msg: Invalid version specified for Elasticsearch
diff --git a/roles/openshift_logging_elasticsearch/tasks/main.yaml b/roles/openshift_logging_elasticsearch/tasks/main.yaml
index e7ef443bd..2bd02af60 100644
--- a/roles/openshift_logging_elasticsearch/tasks/main.yaml
+++ b/roles/openshift_logging_elasticsearch/tasks/main.yaml
@@ -15,18 +15,22 @@
elasticsearch_name: "{{ 'logging-elasticsearch' ~ ( (openshift_logging_elasticsearch_ops_deployment | default(false) | bool) | ternary('-ops', '')) }}"
es_component: "{{ 'es' ~ ( (openshift_logging_elasticsearch_ops_deployment | default(false) | bool) | ternary('-ops', '') ) }}"
-- include: determine_version.yaml
-
- name: Set default image variables based on deployment_type
- include_vars: "{{ item }}"
+ include_vars: "{{ var_file_name }}"
with_first_found:
- "{{ openshift_deployment_type | default(deployment_type) }}.yml"
- "default_images.yml"
+ loop_control:
+ loop_var: var_file_name
-- name: Set elasticsearch_prefix image facts
+- name: Set elasticsearch image facts
set_fact:
openshift_logging_elasticsearch_proxy_image_prefix: "{{ openshift_logging_elasticsearch_proxy_image_prefix | default(__openshift_logging_elasticsearch_proxy_image_prefix) }}"
openshift_logging_elasticsearch_proxy_image_version: "{{ openshift_logging_elasticsearch_proxy_image_version | default(__openshift_logging_elasticsearch_proxy_image_version) }}"
+ openshift_logging_elasticsearch_image_prefix: "{{ openshift_logging_elasticsearch_image_prefix | default(__openshift_logging_elasticsearch_image_prefix) }}"
+ openshift_logging_elasticsearch_image_version: "{{ openshift_logging_elasticsearch_image_version | default(__openshift_logging_elasticsearch_image_version) }}"
+
+- include: determine_version.yaml
# allow passing in a tempdir
- name: Create temp directory for doing work in
diff --git a/roles/openshift_logging_elasticsearch/vars/default_images.yml b/roles/openshift_logging_elasticsearch/vars/default_images.yml
index b7d105caf..d38758324 100644
--- a/roles/openshift_logging_elasticsearch/vars/default_images.yml
+++ b/roles/openshift_logging_elasticsearch/vars/default_images.yml
@@ -1,3 +1,5 @@
---
-__openshift_logging_elasticsearch_proxy_image_prefix: "docker.io/openshift/"
+__openshift_logging_elasticsearch_image_prefix: "{{ openshift_logging_image_prefix | default('docker.io/openshift/origin-') }}"
+__openshift_logging_elasticsearch_image_version: "{{ openshift_logging_image_version | default('latest') }}"
+__openshift_logging_elasticsearch_proxy_image_prefix: "{{ openshift_logging_image_prefix | default('docker.io/openshift/origin-') | regex_replace('$(.*)/origin-', '\\1/') }}"
__openshift_logging_elasticsearch_proxy_image_version: "v1.0.0"
diff --git a/roles/openshift_logging_elasticsearch/vars/openshift-enterprise.yml b/roles/openshift_logging_elasticsearch/vars/openshift-enterprise.yml
index 2fd960bb5..f807c94e0 100644
--- a/roles/openshift_logging_elasticsearch/vars/openshift-enterprise.yml
+++ b/roles/openshift_logging_elasticsearch/vars/openshift-enterprise.yml
@@ -1,3 +1,5 @@
---
+__openshift_logging_elasticsearch_image_prefix: "{{ openshift_logging_image_prefix | default('registry.access.redhat.com/openshift3/') }}"
+__openshift_logging_elasticsearch_image_version: "{{ openshift_logging_image_version | default ('v3.7') }}"
__openshift_logging_elasticsearch_proxy_image_prefix: "{{ openshift_logging_image_prefix | default('registry.access.redhat.com/openshift3/') }}"
__openshift_logging_elasticsearch_proxy_image_version: "v3.7"