Browse Source

Updating logging components image defaulting pattern to match openshift_logging pattern

Eric Wolinetz 7 years ago
parent
commit
6575595891
30 changed files with 141 additions and 47 deletions
  1. 3 1
      roles/openshift_logging/tasks/main.yaml
  2. 0 2
      roles/openshift_logging_curator/defaults/main.yml
  3. 5 5
      roles/openshift_logging_curator/tasks/determine_version.yaml
  4. 13 0
      roles/openshift_logging_curator/tasks/main.yaml
  5. 3 0
      roles/openshift_logging_curator/vars/default_images.yml
  6. 3 0
      roles/openshift_logging_curator/vars/openshift-enterprise.yml
  7. 0 2
      roles/openshift_logging_elasticsearch/defaults/main.yml
  8. 5 7
      roles/openshift_logging_elasticsearch/tasks/determine_version.yaml
  9. 8 4
      roles/openshift_logging_elasticsearch/tasks/main.yaml
  10. 3 1
      roles/openshift_logging_elasticsearch/vars/default_images.yml
  11. 2 0
      roles/openshift_logging_elasticsearch/vars/openshift-enterprise.yml
  12. 0 2
      roles/openshift_logging_eventrouter/defaults/main.yaml
  13. 13 0
      roles/openshift_logging_eventrouter/tasks/main.yaml
  14. 3 0
      roles/openshift_logging_eventrouter/vars/default_images.yml
  15. 3 0
      roles/openshift_logging_eventrouter/vars/openshift-enterprise.yml
  16. 0 2
      roles/openshift_logging_fluentd/defaults/main.yml
  17. 5 5
      roles/openshift_logging_fluentd/tasks/determine_version.yaml
  18. 13 0
      roles/openshift_logging_fluentd/tasks/main.yaml
  19. 3 0
      roles/openshift_logging_fluentd/vars/default_images.yml
  20. 3 0
      roles/openshift_logging_fluentd/vars/openshift-enterprise.yml
  21. 0 4
      roles/openshift_logging_kibana/defaults/main.yml
  22. 5 5
      roles/openshift_logging_kibana/tasks/determine_version.yaml
  23. 14 0
      roles/openshift_logging_kibana/tasks/main.yaml
  24. 5 0
      roles/openshift_logging_kibana/vars/default_images.yml
  25. 5 0
      roles/openshift_logging_kibana/vars/openshift-enterprise.yml
  26. 0 2
      roles/openshift_logging_mux/defaults/main.yml
  27. 5 5
      roles/openshift_logging_mux/tasks/determine_version.yaml
  28. 13 0
      roles/openshift_logging_mux/tasks/main.yaml
  29. 3 0
      roles/openshift_logging_mux/vars/default_images.yml
  30. 3 0
      roles/openshift_logging_mux/vars/openshift-enterprise.yml

+ 3 - 1
roles/openshift_logging/tasks/main.yaml

@@ -4,10 +4,12 @@
   when: openshift_logging_fluentd_nodeselector.keys() | count > 1
 
 - 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 logging image facts
   set_fact:

+ 0 - 2
roles/openshift_logging_curator/defaults/main.yml

@@ -1,7 +1,5 @@
 ---
 ### General logging settings
-openshift_logging_curator_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
-openshift_logging_curator_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_curator_image_pull_secret: "{{ openshift_hosted_logging_image_pull_secret | default('') }}"
 openshift_logging_curator_master_url: "https://kubernetes.default.svc.cluster.local"
 

+ 5 - 5
roles/openshift_logging_curator/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_curator_image_version'
+  when: not openshift_logging_curator_image_version or openshift_logging_curator_image_version == ''
 
 - set_fact:
     curator_version: "{{ __latest_curator_version }}"
-  when: openshift_logging_image_version == 'latest'
+  when: openshift_logging_curator_image_version == 'latest'
 
 # should we just assume that we will have the correct major version?
-- set_fact: curator_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: curator_version="{{ openshift_logging_curator_image_version | regex_replace('^v?(?P<major>\d)\.(?P<minor>\d).*$', '3_\\g<minor>') }}"
+  when: openshift_logging_curator_image_version != 'latest'
 
 - fail:
     msg: Invalid version specified for Curator

+ 13 - 0
roles/openshift_logging_curator/tasks/main.yaml

@@ -1,4 +1,17 @@
 ---
+- 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 curator image facts
+  set_fact:
+    openshift_logging_curator_image_prefix: "{{ openshift_logging_curator_image_prefix | default(__openshift_logging_curator_image_prefix) }}"
+    openshift_logging_curator_image_version: "{{ openshift_logging_curator_image_version | default(__openshift_logging_curator_image_version) }}"
+
 - include: determine_version.yaml
 
 # allow passing in a tempdir

+ 3 - 0
roles/openshift_logging_curator/vars/default_images.yml

@@ -0,0 +1,3 @@
+---
+__openshift_logging_curator_image_prefix: "{{ openshift_logging_image_prefix | default('docker.io/openshift/origin-') }}"
+__openshift_logging_curator_image_version: "{{ openshift_logging_image_version | default('latest') }}"

+ 3 - 0
roles/openshift_logging_curator/vars/openshift-enterprise.yml

@@ -0,0 +1,3 @@
+---
+__openshift_logging_curator_image_prefix: "{{ openshift_logging_image_prefix | default('registry.access.redhat.com/openshift3/') }}"
+__openshift_logging_curator_image_version: "{{ openshift_logging_image_version | default ('v3.7') }}"

+ 0 - 2
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
 

+ 5 - 7
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

+ 8 - 4
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

+ 3 - 1
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"

+ 2 - 0
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"

+ 0 - 2
roles/openshift_logging_eventrouter/defaults/main.yaml

@@ -1,6 +1,4 @@
 ---
-openshift_logging_eventrouter_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
-openshift_logging_eventrouter_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_eventrouter_replicas: 1
 openshift_logging_eventrouter_sink: stdout
 openshift_logging_eventrouter_nodeselector: ""

+ 13 - 0
roles/openshift_logging_eventrouter/tasks/main.yaml

@@ -1,4 +1,17 @@
 ---
+- 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 eventrouter image facts
+  set_fact:
+    openshift_logging_eventrouter_image_prefix: "{{ openshift_logging_eventrouter_image_prefix | default(__openshift_logging_eventrouter_image_prefix) }}"
+    openshift_logging_eventrouter_image_version: "{{ openshift_logging_eventrouter_image_version | default(__openshift_logging_eventrouter_image_version) }}"
+
 - include: "{{ role_path }}/tasks/install_eventrouter.yaml"
   when: openshift_logging_install_eventrouter | default(false) | bool
 

+ 3 - 0
roles/openshift_logging_eventrouter/vars/default_images.yml

@@ -0,0 +1,3 @@
+---
+__openshift_logging_eventrouter_image_prefix: "{{ openshift_logging_image_prefix | default('docker.io/openshift/origin-') }}"
+__openshift_logging_eventrouter_image_version: "{{ openshift_logging_image_version | default('latest') }}"

+ 3 - 0
roles/openshift_logging_eventrouter/vars/openshift-enterprise.yml

@@ -0,0 +1,3 @@
+---
+__openshift_logging_eventrouter_image_prefix: "{{ openshift_logging_image_prefix | default('registry.access.redhat.com/openshift3/') }}"
+__openshift_logging_eventrouter_image_version: "{{ openshift_logging_image_version | default ('v3.7') }}"

+ 0 - 2
roles/openshift_logging_fluentd/defaults/main.yml

@@ -1,7 +1,5 @@
 ---
 ### General logging settings
-openshift_logging_fluentd_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
-openshift_logging_fluentd_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_fluentd_image_pull_secret: "{{ openshift_hosted_logging_image_pull_secret | default('') }}"
 openshift_logging_fluentd_master_url: "https://kubernetes.default.svc.{{ openshift.common.dns_domain }}"
 openshift_logging_fluentd_namespace: logging

+ 5 - 5
roles/openshift_logging_fluentd/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_fluentd_image_version'
+  when: not openshift_logging_fluentd_image_version or openshift_logging_fluentd_image_version == ''
 
 - set_fact:
     fluentd_version: "{{ __latest_fluentd_version }}"
-  when: openshift_logging_image_version == 'latest'
+  when: openshift_logging_fluentd_image_version == 'latest'
 
 # should we just assume that we will have the correct major version?
-- set_fact: fluentd_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: fluentd_version="{{ openshift_logging_fluentd_image_version | regex_replace('^v?(?P<major>\d)\.(?P<minor>\d).*$', '3_\\g<minor>') }}"
+  when: openshift_logging_fluentd_image_version != 'latest'
 
 - fail:
     msg: Invalid version specified for Fluentd

+ 13 - 0
roles/openshift_logging_fluentd/tasks/main.yaml

@@ -34,6 +34,19 @@
     msg: WARNING Use of openshift_logging_mux_client_mode=minimal is not recommended due to current scaling issues
   when: openshift_logging_mux_client_mode is defined and openshift_logging_mux_client_mode == 'minimal'
 
+- 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 fluentd image facts
+  set_fact:
+    openshift_logging_fluentd_image_prefix: "{{ openshift_logging_fluentd_image_prefix | default(__openshift_logging_fluentd_image_prefix) }}"
+    openshift_logging_fluentd_image_version: "{{ openshift_logging_fluentd_image_version | default(__openshift_logging_fluentd_image_version) }}"
+
 - include: determine_version.yaml
 
 # allow passing in a tempdir

+ 3 - 0
roles/openshift_logging_fluentd/vars/default_images.yml

@@ -0,0 +1,3 @@
+---
+__openshift_logging_fluentd_image_prefix: "{{ openshift_logging_image_prefix | default('docker.io/openshift/origin-') }}"
+__openshift_logging_fluentd_image_version: "{{ openshift_logging_image_version | default('latest') }}"

+ 3 - 0
roles/openshift_logging_fluentd/vars/openshift-enterprise.yml

@@ -0,0 +1,3 @@
+---
+__openshift_logging_fluentd_image_prefix: "{{ openshift_logging_image_prefix | default('registry.access.redhat.com/openshift3/') }}"
+__openshift_logging_fluentd_image_version: "{{ openshift_logging_image_version | default ('v3.7') }}"

+ 0 - 4
roles/openshift_logging_kibana/defaults/main.yml

@@ -2,8 +2,6 @@
 ### Common settings
 openshift_logging_kibana_master_url: "https://kubernetes.default.svc.cluster.local"
 openshift_logging_kibana_master_public_url: "https://kubernetes.default.svc.cluster.local"
-openshift_logging_kibana_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
-openshift_logging_kibana_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_kibana_image_pull_secret: "{{ openshift_hosted_logging_image_pull_secret | default('') }}"
 openshift_logging_kibana_namespace: logging
 
@@ -25,8 +23,6 @@ openshift_logging_kibana_edge_term_policy: Redirect
 openshift_logging_kibana_ops_deployment: false
 
 # Proxy settings
-openshift_logging_kibana_proxy_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
-openshift_logging_kibana_proxy_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_kibana_proxy_debug: false
 openshift_logging_kibana_proxy_cpu_limit: null
 openshift_logging_kibana_proxy_cpu_request: 100m

+ 5 - 5
roles/openshift_logging_kibana/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_kibana_image_version'
+  when: not openshift_logging_kibana_image_version or openshift_logging_kibana_image_version == ''
 
 - set_fact:
     kibana_version: "{{ __latest_kibana_version }}"
-  when: openshift_logging_image_version == 'latest'
+  when: openshift_logging_kibana_image_version == 'latest'
 
 # should we just assume that we will have the correct major version?
-- set_fact: kibana_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: kibana_version="{{ openshift_logging_kibana_image_version | regex_replace('^v?(?P<major>\d)\.(?P<minor>\d).*$', '3_\\g<minor>') }}"
+  when: openshift_logging_kibana_image_version != 'latest'
 
 - fail:
     msg: Invalid version specified for Kibana

+ 14 - 0
roles/openshift_logging_kibana/tasks/main.yaml

@@ -1,5 +1,19 @@
 ---
 # fail is we don't have an endpoint for ES to connect to?
+- 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 kibana image facts
+  set_fact:
+    openshift_logging_kibana_image_prefix: "{{ openshift_logging_kibana_image_prefix | default(__openshift_logging_kibana_image_prefix) }}"
+    openshift_logging_kibana_image_version: "{{ openshift_logging_kibana_image_version | default(__openshift_logging_kibana_image_version) }}"
+    openshift_logging_kibana_proxy_image_prefix: "{{ openshift_logging_kibana_proxy_image_prefix | default(__openshift_logging_kibana_proxy_image_prefix) }}"
+    openshift_logging_kibana_proxy_image_version: "{{ openshift_logging_kibana_proxy_image_version | default(__openshift_logging_kibana_proxy_image_version) }}"
 
 - include: determine_version.yaml
 

+ 5 - 0
roles/openshift_logging_kibana/vars/default_images.yml

@@ -0,0 +1,5 @@
+---
+__openshift_logging_kibana_image_prefix: "{{ openshift_logging_image_prefix | default('docker.io/openshift/origin-') }}"
+__openshift_logging_kibana_image_version: "{{ openshift_logging_image_version | default('latest') }}"
+__openshift_logging_kibana_proxy_image_prefix: "{{ openshift_logging_image_prefix | default('docker.io/openshift/origin-') }}"
+__openshift_logging_kibana_proxy_image_version: "{{ openshift_logging_image_version | default('latest') }}"

+ 5 - 0
roles/openshift_logging_kibana/vars/openshift-enterprise.yml

@@ -0,0 +1,5 @@
+---
+__openshift_logging_kibana_image_prefix: "{{ openshift_logging_image_prefix | default('registry.access.redhat.com/openshift3/') }}"
+__openshift_logging_kibana_image_version: "{{ openshift_logging_image_version | default ('v3.7') }}"
+__openshift_logging_kibana_proxy_image_prefix: "{{ openshift_logging_image_prefix | default('registry.access.redhat.com/openshift3/') }}"
+__openshift_logging_kibana_proxy_image_version: "{{ openshift_logging_image_version | default ('v3.7') }}"

+ 0 - 2
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))) }}"

+ 5 - 5
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

+ 13 - 0
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

+ 3 - 0
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') }}"

+ 3 - 0
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') }}"