summaryrefslogtreecommitdiffstats
path: root/roles/template_service_broker
diff options
context:
space:
mode:
authorJim Minter <jminter@redhat.com>2017-10-06 11:35:10 -0500
committerJim Minter <jminter@redhat.com>2017-10-13 16:41:55 -0500
commit991acfe542464c768cf25868039ae1e364a386ad (patch)
tree1520328aaa8de11531f9ff5dd67233a32ad77450 /roles/template_service_broker
parentd5028b30f57cbd5a22a398b5fb1dbf273b3eb2b8 (diff)
downloadopenshift-991acfe542464c768cf25868039ae1e364a386ad.tar.gz
openshift-991acfe542464c768cf25868039ae1e364a386ad.tar.bz2
openshift-991acfe542464c768cf25868039ae1e364a386ad.tar.xz
openshift-991acfe542464c768cf25868039ae1e364a386ad.zip
Rewire openshift_template_service_broker_namespaces configurable
Diffstat (limited to 'roles/template_service_broker')
-rw-r--r--roles/template_service_broker/defaults/main.yml1
-rw-r--r--roles/template_service_broker/tasks/install.yml16
2 files changed, 16 insertions, 1 deletions
diff --git a/roles/template_service_broker/defaults/main.yml b/roles/template_service_broker/defaults/main.yml
index fb407c4a2..a92a138b0 100644
--- a/roles/template_service_broker/defaults/main.yml
+++ b/roles/template_service_broker/defaults/main.yml
@@ -2,3 +2,4 @@
# placeholder file?
template_service_broker_remove: False
template_service_broker_install: False
+openshift_template_service_broker_namespaces: ['openshift']
diff --git a/roles/template_service_broker/tasks/install.yml b/roles/template_service_broker/tasks/install.yml
index f5fd6487c..54008bbf1 100644
--- a/roles/template_service_broker/tasks/install.yml
+++ b/roles/template_service_broker/tasks/install.yml
@@ -28,10 +28,24 @@
- "{{ __tsb_template_file }}"
- "{{ __tsb_rbac_file }}"
- "{{ __tsb_broker_file }}"
+ - "{{ __tsb_config_file }}"
+
+- yedit:
+ src: "{{ mktemp.stdout }}/{{ __tsb_config_file }}"
+ key: templateNamespaces
+ value: "{{ openshift_template_service_broker_namespaces }}"
+ value_type: list
+
+- slurp:
+ src: "{{ mktemp.stdout }}/{{ __tsb_config_file }}"
+ register: config
- 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) }}" --param IMAGE="{{ template_service_broker_prefix }}{{ template_service_broker_image_name }}:{{ template_service_broker_version }}" | kubectl apply -f -
+ oc process -f "{{ mktemp.stdout }}/{{ __tsb_template_file }}"
+ --param API_SERVER_CONFIG="{{ config['content'] | b64decode }}"
+ --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