summaryrefslogtreecommitdiffstats
path: root/roles/openshift_storage_glusterfs/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_storage_glusterfs/tasks')
-rw-r--r--roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml10
1 files changed, 8 insertions, 2 deletions
diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
index ba044a9af..a31c5bd5e 100644
--- a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
+++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
@@ -15,7 +15,7 @@
oc_project:
state: present
name: "{{ glusterfs_namespace }}"
- when: glusterfs_is_native or glusterfs_heketi_is_native
+ when: glusterfs_is_native or glusterfs_heketi_is_native or glusterfs_storageclass
- name: Delete pre-existing heketi resources
oc_obj:
@@ -163,6 +163,12 @@
- glusterfs_heketi_is_native
- glusterfs_heketi_user_key is undefined
+- name: Copy heketi private key
+ copy:
+ src: "{{ glusterfs_heketi_ssh_keyfile | default(omit) }}"
+ content: "{{ '' if glusterfs_heketi_ssh_keyfile is undefined else omit }}"
+ dest: "{{ mktemp.stdout }}/private_key"
+
- name: Create heketi config secret
oc_secret:
namespace: "{{ glusterfs_namespace }}"
@@ -173,7 +179,7 @@
- name: heketi.json
path: "{{ mktemp.stdout }}/heketi.json"
- name: private_key
- path: "{{ glusterfs_heketi_ssh_keyfile }}"
+ path: "{{ mktemp.stdout }}/private_key"
when:
- glusterfs_heketi_is_native