Browse Source

GlusterFS: Reintroduce heketi-cli check for non-native heketi

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Jose A. Rivera 7 years ago
parent
commit
11d153a8a5
1 changed files with 12 additions and 0 deletions
  1. 12 0
      roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml

+ 12 - 0
roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml

@@ -1,4 +1,16 @@
 ---
+- name: Make sure heketi-client is installed
+  package: name=heketi-client state=present
+  when:
+  - not openshift.common.is_atomic | bool
+  - not glusterfs_heketi_is_native | bool
+
+- name: Verify heketi-cli is installed
+  shell: "command -v heketi-cli >/dev/null 2>&1 || { echo >&2 'ERROR: Make sure heketi-cli is available, then re-run the installer'; exit 1; }"
+  changed_when: False
+  when:
+  - not glusterfs_heketi_is_native | bool
+
 - name: Verify target namespace exists
   oc_project:
     state: present