From fc01d4f5fb3d7b53168486bc3ac3c2c47879574d Mon Sep 17 00:00:00 2001 From: Eric Wolinetz Date: Mon, 25 Sep 2017 12:40:52 -0500 Subject: Passing in image parameter for tsb template --- roles/template_service_broker/tasks/install.yml | 6 ++++-- roles/template_service_broker/vars/default_images.yml | 4 +++- roles/template_service_broker/vars/openshift-enterprise.yml | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'roles/template_service_broker') diff --git a/roles/template_service_broker/tasks/install.yml b/roles/template_service_broker/tasks/install.yml index 199df83c2..a9d22aa06 100644 --- a/roles/template_service_broker/tasks/install.yml +++ b/roles/template_service_broker/tasks/install.yml @@ -8,7 +8,9 @@ - name: set ansible_service_broker facts set_fact: - template_service_broker_image: "{{ template_service_broker_image | default(__template_service_broker_image) }}" + template_service_broker_prefix: "{{ template_service_broker_prefix | default(__template_service_broker_prefix) }}" + template_service_broker_version: "{{ template_service_broker_version | default(__template_service_broker_version) }}" + template_service_broker_image_name: "{{ template_service_broker_image_name | default(__template_service_broker_image_name) }}" - oc_project: name: openshift-template-service-broker @@ -28,7 +30,7 @@ - name: Apply template file shell: > - oc process -f "{{ mktemp.stdout }}/{{ __tsb_template_file }}" --param API_SERVER_CONFIG="{{ lookup('file', __tsb_files_location ~ '/' ~ __tsb_config_file) }}" | kubectl apply -f - + oc process -f "{{ mktemp.stdout }}/{{ __tsb_template_file }}" --param API_SERVER_CONFIG="{{ lookup('file', __tsb_files_location ~ '/' ~ __tsb_config_file) }}" --param IMAGE="{{ template_service_broker_prefix }}{{ template_service_broker_image_name }}:{{ template_service_broker_version }}" | kubectl apply -f - # reconcile with rbac - name: Reconcile with RBAC file diff --git a/roles/template_service_broker/vars/default_images.yml b/roles/template_service_broker/vars/default_images.yml index 807f2822c..77afe1f43 100644 --- a/roles/template_service_broker/vars/default_images.yml +++ b/roles/template_service_broker/vars/default_images.yml @@ -1,2 +1,4 @@ --- -__template_service_broker_image: "" +__template_service_broker_prefix: "docker.io/openshift/" +__template_service_broker_version: "latest" +__template_service_broker_image_name: "origin" diff --git a/roles/template_service_broker/vars/openshift-enterprise.yml b/roles/template_service_broker/vars/openshift-enterprise.yml index 807f2822c..dfab1e01b 100644 --- a/roles/template_service_broker/vars/openshift-enterprise.yml +++ b/roles/template_service_broker/vars/openshift-enterprise.yml @@ -1,2 +1,4 @@ --- -__template_service_broker_image: "" +__template_service_broker_prefix: "registry.access.redhat.com/openshift3/" +__template_service_broker_version: "v3.7" +__template_service_broker_image_name: "ose" -- cgit v1.2.3