From 5d78e74dae92199c2e07627f91ae2a0c780f6437 Mon Sep 17 00:00:00 2001
From: "Jose A. Rivera" <jarrpa@redhat.com>
Date: Wed, 2 Aug 2017 13:22:27 -0500
Subject: GlusterFS: Copy SSH private key to master node.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1477718

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
---
 roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
index 19eb3cdf7..3c8621bbf 100644
--- a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
+++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
@@ -163,6 +163,11 @@
   - glusterfs_heketi_is_native
   - glusterfs_heketi_user_key is undefined
 
+- name: Copy heketi private key
+  copy:
+    src: "{{ glusterfs_heketi_ssh_keyfile }}"
+    dest: "{{ mktemp.stdout }}/private_key"
+
 - name: Create heketi config secret
   oc_secret:
     namespace: "{{ glusterfs_namespace }}"
@@ -173,7 +178,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
 
-- 
cgit v1.2.3