diff options
author | Jose A. Rivera <jarrpa@redhat.com> | 2017-06-16 18:02:18 -0500 |
---|---|---|
committer | Jose A. Rivera <jarrpa@redhat.com> | 2017-06-16 18:02:18 -0500 |
commit | b1c40b3dbbc7cfbf9ed0f6f657a68b4ea6a53136 (patch) | |
tree | 11db64bdb56044b01cc88ec80c131898b78cb69a /roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml | |
parent | 08dd5120fce0238a579154542655452208f37311 (diff) | |
download | openshift-b1c40b3dbbc7cfbf9ed0f6f657a68b4ea6a53136.tar.gz openshift-b1c40b3dbbc7cfbf9ed0f6f657a68b4ea6a53136.tar.bz2 openshift-b1c40b3dbbc7cfbf9ed0f6f657a68b4ea6a53136.tar.xz openshift-b1c40b3dbbc7cfbf9ed0f6f657a68b4ea6a53136.zip |
GlusterFS: Generate better secret keys
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Diffstat (limited to 'roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml')
-rw-r--r-- | roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml index 92accc170..4406ef28b 100644 --- a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml +++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml @@ -123,6 +123,23 @@ when: - glusterfs_heketi_topology_load +- name: Generate heketi admin key + set_fact: + glusterfs_heketi_admin_key: "{{ 32 | oo_generate_secret }}" + when: + - glusterfs_heketi_is_native + - glusterfs_heketi_admin_key is undefined + +- name: Generate heketi user key + set_fact: + glusterfs_heketi_user_key: "{{ 32 | oo_generate_secret }}" + until: "glusterfs_heketi_user_key != glusterfs_heketi_admin_key" + delay: 1 + retries: 10 + when: + - glusterfs_heketi_is_native + - glusterfs_heketi_user_key is undefined + - include: heketi_deploy_part1.yml when: - glusterfs_heketi_is_native |