diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-07-18 17:02:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 17:02:26 -0400 |
commit | f1711875170934936895fe24ac1f7ab721608c5a (patch) | |
tree | 0f1b273920d7a543f1f45a4f3d5c402ee1d4c908 /roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml | |
parent | 2394c7518aac568ed074d2ea3c2effbb858a7523 (diff) | |
parent | 2a0c64c4174dfcc079254d1fe04125ad6adfe038 (diff) | |
download | openshift-f1711875170934936895fe24ac1f7ab721608c5a.tar.gz openshift-f1711875170934936895fe24ac1f7ab721608c5a.tar.bz2 openshift-f1711875170934936895fe24ac1f7ab721608c5a.tar.xz openshift-f1711875170934936895fe24ac1f7ab721608c5a.zip |
Merge pull request #4769 from jarrpa/glusterfs-fixes-five
GlusterFS fixes 5
Diffstat (limited to 'roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml')
-rw-r--r-- | roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml index 99ad029da..600d8f676 100644 --- a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml +++ b/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 {{ glusterfs_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 @@ -173,7 +185,7 @@ - name: Set heketi-cli command set_fact: - glusterfs_heketi_client: "{% if glusterfs_heketi_is_native %}{{ openshift.common.client_binary }} rsh --namespace={{ glusterfs_namespace }} {{ heketi_pod.results.results[0]['items'][0]['metadata']['name'] }} {% endif %}heketi-cli -s http://{% if glusterfs_heketi_is_native %}localhost:8080{% else %}{{ glusterfs_heketi_url }}:{{ glusterfs_heketi_port }}{% endif %} --user admin --secret '{{ glusterfs_heketi_admin_key }}'" + glusterfs_heketi_client: "{% if glusterfs_heketi_is_native %}{{ openshift.common.client_binary }} rsh --namespace={{ glusterfs_namespace }} {{ heketi_pod.results.results[0]['items'][0]['metadata']['name'] }} {% endif %}{{ glusterfs_heketi_cli }} -s http://{% if glusterfs_heketi_is_native %}localhost:8080{% else %}{{ glusterfs_heketi_url }}:{{ glusterfs_heketi_port }}{% endif %} --user admin {% if glusterfs_heketi_admin_key is defined %}--secret '{{ glusterfs_heketi_admin_key }}'{% endif %}" - name: Verify heketi service command: "{{ glusterfs_heketi_client }} cluster list" @@ -203,6 +215,7 @@ data: "{{ glusterfs_heketi_admin_key }}" when: - glusterfs_storageclass + - glusterfs_heketi_admin_key is defined - name: Get heketi route oc_obj: |