summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorJose A. Rivera <jarrpa@redhat.com>2017-08-04 08:01:52 -0500
committerJose A. Rivera <jarrpa@redhat.com>2017-08-04 08:03:05 -0500
commitc89a8657ef2e7ef2f5c9cd6929225b0adb742dd0 (patch)
treeb1132b1339760e3a032f64740831e24d87024c34 /roles
parent05a9c91735cc95457411dbb19951341e5418df18 (diff)
downloadopenshift-c89a8657ef2e7ef2f5c9cd6929225b0adb742dd0.tar.gz
openshift-c89a8657ef2e7ef2f5c9cd6929225b0adb742dd0.tar.bz2
openshift-c89a8657ef2e7ef2f5c9cd6929225b0adb742dd0.tar.xz
openshift-c89a8657ef2e7ef2f5c9cd6929225b0adb742dd0.zip
GlusterFS: Don't use /dev/null for empty file.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1478198 Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_storage_glusterfs/README.md2
-rw-r--r--roles/openshift_storage_glusterfs/defaults/main.yml4
-rw-r--r--roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml3
3 files changed, 5 insertions, 4 deletions
diff --git a/roles/openshift_storage_glusterfs/README.md b/roles/openshift_storage_glusterfs/README.md
index b367e7daf..d3de2165a 100644
--- a/roles/openshift_storage_glusterfs/README.md
+++ b/roles/openshift_storage_glusterfs/README.md
@@ -97,7 +97,7 @@ GlusterFS cluster into a new or existing OpenShift cluster:
| openshift_storage_glusterfs_heketi_ssh_port | 22 | SSH port for external GlusterFS nodes via native heketi
| openshift_storage_glusterfs_heketi_ssh_user | 'root' | SSH user for external GlusterFS nodes via native heketi
| openshift_storage_glusterfs_heketi_ssh_sudo | False | Whether to sudo (if non-root user) for SSH to external GlusterFS nodes via native heketi
-| openshift_storage_glusterfs_heketi_ssh_keyfile | '/dev/null' | Path to a private key file for use with SSH connections to external GlusterFS nodes via native heketi **NOTE:** This must be an absolute path
+| openshift_storage_glusterfs_heketi_ssh_keyfile | Undefined | Path to a private key file for use with SSH connections to external GlusterFS nodes via native heketi **NOTE:** This must be an absolute path
| openshift_storage_glusterfs_heketi_wipe | False | Destroy any existing heketi resources, defaults to the value of `openshift_storage_glusterfs_wipe`
Each role variable also has a corresponding variable to optionally configure a
diff --git a/roles/openshift_storage_glusterfs/defaults/main.yml b/roles/openshift_storage_glusterfs/defaults/main.yml
index 2823a7610..ff2c18812 100644
--- a/roles/openshift_storage_glusterfs/defaults/main.yml
+++ b/roles/openshift_storage_glusterfs/defaults/main.yml
@@ -23,7 +23,7 @@ openshift_storage_glusterfs_heketi_executor: 'kubernetes'
openshift_storage_glusterfs_heketi_ssh_port: 22
openshift_storage_glusterfs_heketi_ssh_user: 'root'
openshift_storage_glusterfs_heketi_ssh_sudo: False
-openshift_storage_glusterfs_heketi_ssh_keyfile: '/dev/null'
+openshift_storage_glusterfs_heketi_ssh_keyfile: "{{ omit }}"
openshift_storage_glusterfs_namespace: "{{ 'glusterfs' | quote if openshift_storage_glusterfs_is_native or openshift_storage_glusterfs_heketi_is_native else 'default' | quote }}"
openshift_storage_glusterfs_registry_timeout: "{{ openshift_storage_glusterfs_timeout }}"
@@ -51,4 +51,4 @@ openshift_storage_glusterfs_registry_heketi_executor: "{{ openshift_storage_glus
openshift_storage_glusterfs_registry_heketi_ssh_port: "{{ openshift_storage_glusterfs_heketi_ssh_port }}"
openshift_storage_glusterfs_registry_heketi_ssh_user: "{{ openshift_storage_glusterfs_heketi_ssh_user }}"
openshift_storage_glusterfs_registry_heketi_ssh_sudo: "{{ openshift_storage_glusterfs_heketi_ssh_sudo }}"
-openshift_storage_glusterfs_registry_heketi_ssh_keyfile: "{{ openshift_storage_glusterfs_heketi_ssh_keyfile }}"
+openshift_storage_glusterfs_registry_heketi_ssh_keyfile: "{{ openshift_storage_glusterfs_heketi_ssh_keyfile | default(omit) }}"
diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
index 3c8621bbf..981688ac3 100644
--- a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
+++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
@@ -165,7 +165,8 @@
- name: Copy heketi private key
copy:
- src: "{{ glusterfs_heketi_ssh_keyfile }}"
+ 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