summaryrefslogtreecommitdiffstats
path: root/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml')
-rw-r--r--roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml24
1 files changed, 23 insertions, 1 deletions
diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
index a5fdae803..4928e86e5 100644
--- a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
+++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
@@ -313,7 +313,10 @@
- glusterfs_storageclass or glusterfs_s3_deploy
- include_tasks: glusterblock_deploy.yml
- when: glusterfs_block_deploy
+ when:
+ - glusterfs_block_deploy
+ #TODO: Remove this when multipathd will be available on atomic
+ - not openshift_is_atomic | bool
- block:
- name: Create heketi block secret
@@ -327,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"