From 4a3033d39328449ae0f0abc711bd8ceec5fb9d5b Mon Sep 17 00:00:00 2001 From: Michael Gugino Date: Mon, 13 Nov 2017 13:17:06 -0500 Subject: Fix extension script for catalog Currently, playbook wire_aggregator places an empty plugin script for openshift master called openshift-ansible-catalog-console.js This file should not be empty if using template_service_broker. I have updated this file to include a boolean and the proper string. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1506502 --- .../files/openshift-ansible-catalog-console.js | 2 -- .../common/openshift-master/tasks/wire_aggregator.yml | 18 +++++++++--------- .../templates/openshift-ansible-catalog-console.js | 1 + .../files/openshift-ansible-catalog-console.js | 1 - roles/template_service_broker/tasks/install.yml | 5 ----- 5 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 playbooks/common/openshift-master/files/openshift-ansible-catalog-console.js create mode 100644 playbooks/common/openshift-master/templates/openshift-ansible-catalog-console.js delete mode 100644 roles/template_service_broker/files/openshift-ansible-catalog-console.js diff --git a/playbooks/common/openshift-master/files/openshift-ansible-catalog-console.js b/playbooks/common/openshift-master/files/openshift-ansible-catalog-console.js deleted file mode 100644 index d0a9f11dc..000000000 --- a/playbooks/common/openshift-master/files/openshift-ansible-catalog-console.js +++ /dev/null @@ -1,2 +0,0 @@ -// empty file so that the master-config can still point to a file that exists -// this file will be replaced by the template service broker role if enabled diff --git a/playbooks/common/openshift-master/tasks/wire_aggregator.yml b/playbooks/common/openshift-master/tasks/wire_aggregator.yml index df3ea27b4..0d23e9d61 100644 --- a/playbooks/common/openshift-master/tasks/wire_aggregator.yml +++ b/playbooks/common/openshift-master/tasks/wire_aggregator.yml @@ -136,9 +136,15 @@ when: - not front_proxy_kubeconfig.stat.exists -- name: copy tech preview extension file for service console UI - copy: - src: openshift-ansible-catalog-console.js +- name: Delete temp directory + file: + name: "{{ certtemp.stdout }}" + state: absent + changed_when: False + +- name: Setup extension file for service console UI + template: + src: ../templates/openshift-ansible-catalog-console.js dest: /etc/origin/master/openshift-ansible-catalog-console.js - name: Update master config @@ -212,9 +218,3 @@ changed_when: false when: - yedit_output.changed - -- name: Delete temp directory - file: - name: "{{ certtemp.stdout }}" - state: absent - changed_when: False diff --git a/playbooks/common/openshift-master/templates/openshift-ansible-catalog-console.js b/playbooks/common/openshift-master/templates/openshift-ansible-catalog-console.js new file mode 100644 index 000000000..fd02325ba --- /dev/null +++ b/playbooks/common/openshift-master/templates/openshift-ansible-catalog-console.js @@ -0,0 +1 @@ +window.OPENSHIFT_CONSTANTS.TEMPLATE_SERVICE_BROKER_ENABLED = {{ 'true' if (template_service_broker_install | default(True)) else 'false' }}; diff --git a/roles/template_service_broker/files/openshift-ansible-catalog-console.js b/roles/template_service_broker/files/openshift-ansible-catalog-console.js deleted file mode 100644 index 622afb6bd..000000000 --- a/roles/template_service_broker/files/openshift-ansible-catalog-console.js +++ /dev/null @@ -1 +0,0 @@ -window.OPENSHIFT_CONSTANTS.TEMPLATE_SERVICE_BROKER_ENABLED = true; diff --git a/roles/template_service_broker/tasks/install.yml b/roles/template_service_broker/tasks/install.yml index 0db9e642a..99a58baff 100644 --- a/roles/template_service_broker/tasks/install.yml +++ b/roles/template_service_broker/tasks/install.yml @@ -52,11 +52,6 @@ shell: > {{ openshift.common.client_binary }} process -f "{{ mktemp.stdout }}/{{ __tsb_rbac_file }}" | {{ openshift.common.client_binary }} auth reconcile -f - -- name: copy tech preview extension file for service console UI - copy: - src: openshift-ansible-catalog-console.js - dest: /etc/origin/master/openshift-ansible-catalog-console.js - # Check that the TSB is running - name: Verify that TSB is running command: > -- cgit v1.2.3