summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging_mux
diff options
context:
space:
mode:
authorEric Wolinetz <ewolinet@redhat.com>2017-11-06 15:53:55 -0600
committerEric Wolinetz <ewolinet@redhat.com>2017-11-06 15:56:54 -0600
commit6575595891f71e7d9b9ac929b9ba58117a65e17b (patch)
treeab67b815c16d300296d6c751a25daeb1a824d8c6 /roles/openshift_logging_mux
parent9e5462826beb7bece09e55b20f3fe47a65c8b44c (diff)
downloadopenshift-6575595891f71e7d9b9ac929b9ba58117a65e17b.tar.gz
openshift-6575595891f71e7d9b9ac929b9ba58117a65e17b.tar.bz2
openshift-6575595891f71e7d9b9ac929b9ba58117a65e17b.tar.xz
openshift-6575595891f71e7d9b9ac929b9ba58117a65e17b.zip
Updating logging components image defaulting pattern to match openshift_logging pattern
Diffstat (limited to 'roles/openshift_logging_mux')
-rw-r--r--roles/openshift_logging_mux/defaults/main.yml2
-rw-r--r--roles/openshift_logging_mux/tasks/determine_version.yaml10
-rw-r--r--roles/openshift_logging_mux/tasks/main.yaml13
-rw-r--r--roles/openshift_logging_mux/vars/default_images.yml3
-rw-r--r--roles/openshift_logging_mux/vars/openshift-enterprise.yml3
5 files changed, 24 insertions, 7 deletions
diff --git a/roles/openshift_logging_mux/defaults/main.yml b/roles/openshift_logging_mux/defaults/main.yml
index 9de686576..cd15da939 100644
--- a/roles/openshift_logging_mux/defaults/main.yml
+++ b/roles/openshift_logging_mux/defaults/main.yml
@@ -1,7 +1,5 @@
---
### General logging settings
-openshift_logging_mux_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
-openshift_logging_mux_image_version: "{{ openshift_logging_image_version | default('latest') }}"
openshift_logging_mux_image_pull_secret: "{{ openshift_hosted_logging_image_pull_secret | default('') }}"
openshift_logging_mux_master_url: "https://kubernetes.default.svc.{{ openshift.common.dns_domain }}"
openshift_logging_mux_master_public_url: "{{ openshift_hosted_logging_master_public_url | default('https://' + openshift.common.public_hostname + ':' ~ (openshift_master_api_port | default('8443', true))) }}"
diff --git a/roles/openshift_logging_mux/tasks/determine_version.yaml b/roles/openshift_logging_mux/tasks/determine_version.yaml
index 229bcf3d5..769475dd5 100644
--- a/roles/openshift_logging_mux/tasks/determine_version.yaml
+++ b/roles/openshift_logging_mux/tasks/determine_version.yaml
@@ -1,16 +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_mux_image_version'
+ when: not openshift_logging_mux_image_version or openshift_logging_mux_image_version == ''
- set_fact:
mux_version: "{{ __latest_mux_version }}"
- when: openshift_logging_image_version == 'latest'
+ when: openshift_logging_mux_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'
+- set_fact: mux_version="{{ openshift_logging_mux_image_version | regex_replace('^v?(?P<major>\d)\.(?P<minor>\d).*$', '3_\\g<minor>') }}"
+ when: openshift_logging_mux_image_version != 'latest'
- fail:
msg: Invalid version specified for mux
diff --git a/roles/openshift_logging_mux/tasks/main.yaml b/roles/openshift_logging_mux/tasks/main.yaml
index 5b257139e..ac7f50c4f 100644
--- a/roles/openshift_logging_mux/tasks/main.yaml
+++ b/roles/openshift_logging_mux/tasks/main.yaml
@@ -7,6 +7,19 @@
msg: Operations logs destination is required
when: not openshift_logging_mux_ops_host or openshift_logging_mux_ops_host == ''
+- name: Set default image variables based on deployment_type
+ 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 mux image facts
+ set_fact:
+ openshift_logging_mux_image_prefix: "{{ openshift_logging_mux_image_prefix | default(__openshift_logging_mux_image_prefix) }}"
+ openshift_logging_mux_image_version: "{{ openshift_logging_mux_image_version | default(__openshift_logging_mux_image_version) }}"
+
- include: determine_version.yaml
# allow passing in a tempdir
diff --git a/roles/openshift_logging_mux/vars/default_images.yml b/roles/openshift_logging_mux/vars/default_images.yml
new file mode 100644
index 000000000..bd5dc4504
--- /dev/null
+++ b/roles/openshift_logging_mux/vars/default_images.yml
@@ -0,0 +1,3 @@
+---
+__openshift_logging_mux_image_prefix: "{{ openshift_logging_image_prefix | default('docker.io/openshift/origin-') }}"
+__openshift_logging_mux_image_version: "{{ openshift_logging_image_version | default('latest') }}"
diff --git a/roles/openshift_logging_mux/vars/openshift-enterprise.yml b/roles/openshift_logging_mux/vars/openshift-enterprise.yml
new file mode 100644
index 000000000..1e7eb9d8d
--- /dev/null
+++ b/roles/openshift_logging_mux/vars/openshift-enterprise.yml
@@ -0,0 +1,3 @@
+---
+__openshift_logging_mux_image_prefix: "{{ openshift_logging_image_prefix | default('registry.access.redhat.com/openshift3/') }}"
+__openshift_logging_mux_image_version: "{{ openshift_logging_image_version | default ('v3.7') }}"