From bc712160ddd27d0531a66da4f930d26b5506aa34 Mon Sep 17 00:00:00 2001 From: "Jose A. Rivera" Date: Thu, 8 Feb 2018 07:53:47 -0600 Subject: GlusterFS: Fix block StorageClass heketi route --- .../tasks/glusterfs_common.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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" -- cgit v1.2.1