diff --git a/contrib/network-storage/heketi/roles/provision/tasks/main.yml b/contrib/network-storage/heketi/roles/provision/tasks/main.yml index cae035893d24ccf7f07eaf997d6aa91a64c96818..4adc2dbb2e80cd81a410788c6a0f970d032c60e7 100644 --- a/contrib/network-storage/heketi/roles/provision/tasks/main.yml +++ b/contrib/network-storage/heketi/roles/provision/tasks/main.yml @@ -7,7 +7,7 @@ - name: "Kubernetes Apps | Test Heketi" register: "heketi_service_state" - command: "kubectl get service heketi-storage-endpoints -o=name --ignore-not-found=true" + command: "{{bin_dir}}/kubectl get service heketi-storage-endpoints -o=name --ignore-not-found=true" changed_when: false - name: "Kubernetes Apps | Bootstrap Heketi" diff --git a/contrib/network-storage/heketi/roles/provision/tasks/secret.yml b/contrib/network-storage/heketi/roles/provision/tasks/secret.yml index 699eaf34b878ba8af3cd98a07945ef49e1b6e5e7..8ca21bcb693a225ba7063bd7995e34b1f564ca40 100644 --- a/contrib/network-storage/heketi/roles/provision/tasks/secret.yml +++ b/contrib/network-storage/heketi/roles/provision/tasks/secret.yml @@ -1,17 +1,17 @@ --- - register: "clusterrolebinding_state" - command: "kubectl get clusterrolebinding heketi-gluster-admin -o=name --ignore-not-found=true" + command: "{{bin_dir}}/kubectl get clusterrolebinding heketi-gluster-admin -o=name --ignore-not-found=true" changed_when: false - name: "Kubernetes Apps | Deploy cluster role binding." when: "clusterrolebinding_state.stdout == \"\"" - command: "kubectl create clusterrolebinding heketi-gluster-admin --clusterrole=edit --serviceaccount=default:heketi-service-account" + command: "{{bin_dir}}/kubectl create clusterrolebinding heketi-gluster-admin --clusterrole=edit --serviceaccount=default:heketi-service-account" - register: "clusterrolebinding_state" - command: "kubectl get clusterrolebinding heketi-gluster-admin -o=name --ignore-not-found=true" + command: "{{bin_dir}}/kubectl get clusterrolebinding heketi-gluster-admin -o=name --ignore-not-found=true" changed_when: false - assert: { that: "clusterrolebinding_state.stdout != \"\"", message: "Cluster role binding is not present." } - register: "secret_state" - command: "kubectl get secret heketi-config-secret -o=name --ignore-not-found=true" + command: "{{bin_dir}}/kubectl get secret heketi-config-secret -o=name --ignore-not-found=true" changed_when: false - name: "Render Heketi secret configuration." become: true @@ -20,8 +20,8 @@ dest: "{{ kube_config_dir }}/heketi.json" - name: "Deploy Heketi config secret" when: "secret_state.stdout == \"\"" - command: "kubectl create secret generic heketi-config-secret --from-file={{ kube_config_dir }}/heketi.json" + command: "{{bin_dir}}/kubectl create secret generic heketi-config-secret --from-file={{ kube_config_dir }}/heketi.json" - register: "secret_state" - command: "kubectl get secret heketi-config-secret -o=name --ignore-not-found=true" + command: "{{bin_dir}}/kubectl get secret heketi-config-secret -o=name --ignore-not-found=true" changed_when: false - assert: { that: "secret_state.stdout != \"\"", message: "Heketi config secret is not present." } diff --git a/contrib/network-storage/heketi/roles/provision/tasks/storageclass.yml b/contrib/network-storage/heketi/roles/provision/tasks/storageclass.yml index 835dc78b26dfd0f69533f58dca94fc6312130926..afd818eb31bf93a6e852ead15e5f89df307319ae 100644 --- a/contrib/network-storage/heketi/roles/provision/tasks/storageclass.yml +++ b/contrib/network-storage/heketi/roles/provision/tasks/storageclass.yml @@ -20,5 +20,6 @@ - name: "Kubernetes Apps | Install and configure Storace Class" kube: name: "GlusterFS" + kubectl: "{{bin_dir}}/kubectl" filename: "{{ kube_config_dir }}/storageclass.yml" state: "{{ rendering.changed | ternary('latest', 'present') }}"