diff --git a/contrib/network-storage/heketi/roles/provision/tasks/main.yml b/contrib/network-storage/heketi/roles/provision/tasks/main.yml index cae035893..4adc2dbb2 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 699eaf34b..8ca21bcb6 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 835dc78b2..afd818eb3 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') }}"