Browse Source

Specify enterprise defaults for logging and metrics images

Scott Dodson 8 years ago
parent
commit
f1aec47273

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

@@ -1,6 +1,4 @@
 ---
-openshift_logging_image_prefix: "{{ openshift_hosted_logging_deployer_prefix | default('docker.io/openshift/origin-') }}"
-openshift_logging_image_version: "{{ openshift_hosted_logging_deployer_version | default('latest') }}"
 openshift_logging_use_ops: "{{ openshift_hosted_logging_enable_ops_cluster | default('false') | bool }}"
 openshift_logging_master_url: "https://kubernetes.default.svc.{{ openshift.common.dns_domain }}"
 openshift_logging_master_public_url: "{{ openshift_hosted_logging_master_public_url | default('https://' + openshift.common.public_hostname + ':' ~ (openshift_master_api_port | default('8443', true))) }}"

+ 6 - 0
roles/openshift_logging/tasks/main.yaml

@@ -3,6 +3,12 @@
     msg: Only one Fluentd nodeselector key pair should be provided
   when: "{{ openshift_logging_fluentd_nodeselector.keys() | count }} > 1"
 
+- name: Set default image variables based on deployment_type
+  include_vars: "{{ item }}"
+  with_first_found:
+    - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
+    - "default_images.yml"
+
 - name: Create temp directory for doing work in
   command: mktemp -d /tmp/openshift-logging-ansible-XXXXXX
   register: mktemp

+ 2 - 0
roles/openshift_logging/vars/default_images.yml

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

+ 2 - 0
roles/openshift_logging/vars/openshift-enterprise.yml

@@ -0,0 +1,2 @@
+openshift_logging_image_prefix: "{{ openshift_hosted_logging_deployer_prefix | default('registry.access.redhat.com/openshift3/') }}"
+openshift_logging_image_version: "{{ openshift_hosted_logging_deployer_version | default(openshift_release | default ('3.5.0') ) }}"

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

@@ -1,8 +1,6 @@
 ---
 openshift_metrics_start_cluster: True
 openshift_metrics_install_metrics: True
-openshift_metrics_image_prefix: docker.io/openshift/origin-
-openshift_metrics_image_version: latest
 openshift_metrics_startup_timeout: 500
 
 openshift_metrics_hawkular_replicas: 1

+ 7 - 0
roles/openshift_metrics/tasks/main.yaml

@@ -1,4 +1,11 @@
 ---
+
+- name: Set default image variables based on deployment_type
+  include_vars: "{{ item }}"
+  with_first_found:
+    - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
+    - "default_images.yml"
+
 - name: Create temp directory for doing work in on target
   command: mktemp -td openshift-metrics-ansible-XXXXXX
   register: mktemp

+ 2 - 0
roles/openshift_metrics/vars/default_images.yml

@@ -0,0 +1,2 @@
+openshift_metrics_image_prefix: "{{ openshift_hosted_metrics_deployer_prefix | default('docker.io/openshift/origin-') }}"
+openshift_metrics_image_version: "{{ openshift_hosted_metrics_deployer_version | default('latest') }}"

+ 2 - 0
roles/openshift_metrics/vars/openshift-enterprise.yml

@@ -0,0 +1,2 @@
+openshift_metrics_image_prefix: "{{ openshift_hosted_metrics_deployer_prefix | default('registry.access.redhat.com/openshift3/') }}"
+openshift_metrics_image_version: "{{ openshift_hosted_metrics_deployer_version | default(openshift_release | default ('3.5.0') ) }}"