Browse Source

Fix overriding openshift_{logging,metrics}_image_prefix

Scott Dodson 8 years ago
parent
commit
22d8eccb74

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

@@ -9,6 +9,11 @@
     - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
     - "default_images.yml"
 
+- name: Set logging image facts
+  set_fact:
+    openshift_logging_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
+    openshift_logging_image_version: "{{ openshift_logging_image_version | default(__openshift_logging_image_version) }}"
+
 - name: Create temp directory for doing work in
   command: mktemp -d /tmp/openshift-logging-ansible-XXXXXX
   register: mktemp

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

@@ -1,3 +1,3 @@
 ---
-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_image_prefix: "{{ openshift_hosted_logging_deployer_prefix | default('docker.io/openshift/origin-') }}"
+__openshift_logging_image_version: "{{ openshift_hosted_logging_deployer_version | default('latest') }}"

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

@@ -1,3 +1,3 @@
 ---
-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') ) }}"
+__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') ) }}"

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

@@ -6,6 +6,11 @@
     - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
     - "default_images.yml"
 
+- name: Set metrics image facts
+  set_fact:
+    openshift_metrics_image_prefix: "{{ openshift_metrics_image_prefix | default(__openshift_metrics_image_prefix) }}"
+    openshift_metrics_image_version: "{{ openshift_metrics_image_version | default(__openshift_metrics_image_version) }}"
+
 - name: Create temp directory for doing work in on target
   command: mktemp -td openshift-metrics-ansible-XXXXXX
   register: mktemp

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

@@ -1,3 +1,3 @@
 ---
-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') }}"
+__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 - 2
roles/openshift_metrics/vars/openshift-enterprise.yml

@@ -1,3 +1,3 @@
 ---
-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') ) }}"
+__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') ) }}"