summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorJose A. Rivera <jarrpa@redhat.com>2018-02-08 07:53:47 -0600
committerJose A. Rivera <jarrpa@redhat.com>2018-02-08 09:07:11 -0600
commitbc712160ddd27d0531a66da4f930d26b5506aa34 (patch)
tree59b3e3af761dd0bd08990f5195f4b48cf61c58f8 /roles
parent58b32c510225d6f9d8b9c716dac5eb1c857f328c (diff)
downloadopenshift-bc712160ddd27d0531a66da4f930d26b5506aa34.tar.gz
openshift-bc712160ddd27d0531a66da4f930d26b5506aa34.tar.bz2
openshift-bc712160ddd27d0531a66da4f930d26b5506aa34.tar.xz
openshift-bc712160ddd27d0531a66da4f930d26b5506aa34.zip
GlusterFS: Fix block StorageClass heketi route
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
index e6e261b52..4928e86e5 100644
--- a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
+++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
@@ -330,6 +330,25 @@
- path: key
data: "{{ glusterfs_heketi_admin_key }}"
when: glusterfs_heketi_admin_key is defined
+
+ - name: Get heketi route
+ oc_obj:
+ namespace: "{{ glusterfs_namespace }}"
+ kind: route
+ state: list
+ name: "heketi-{{ glusterfs_name }}"
+ register: heketi_route
+ when:
+ - glusterfs_heketi_is_native
+ - glusterfs_heketi_route is not defined
+
+ - name: Determine StorageClass heketi URL
+ set_fact:
+ glusterfs_heketi_route: "{{ heketi_route.results.results[0]['spec']['host'] }}"
+ when:
+ - glusterfs_heketi_is_native
+ - glusterfs_heketi_route is not defined
+
- name: Generate Gluster Block StorageClass file
template:
src: "{{ openshift.common.examples_content_version }}/gluster-block-storageclass.yml.j2"