diff options
Diffstat (limited to 'roles/kubernetes/addons/intel-gpu-device-plugin/tasks/main.yml')
-rw-r--r-- | roles/kubernetes/addons/intel-gpu-device-plugin/tasks/main.yml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/kubernetes/addons/intel-gpu-device-plugin/tasks/main.yml b/roles/kubernetes/addons/intel-gpu-device-plugin/tasks/main.yml new file mode 100644 index 00000000..81115d35 --- /dev/null +++ b/roles/kubernetes/addons/intel-gpu-device-plugin/tasks/main.yml @@ -0,0 +1,25 @@ +--- +- name: deploy intel-gpu device-plugin + run_once: true + delegate_to: "{{ groups['_kubernetes_primary_controlplane_node_'] | first }}" + block: + - name: create base directory for intel-gpu device-plugin + file: + path: /etc/kubernetes/addons/intel-gpu-device-plugin + state: directory + + - name: copy config for intel-gpu-device-plugin + template: + src: "config.{{ kubernetes_intel_gpu_device_plugin_version }}.yml.j2" + dest: /etc/kubernetes/addons/intel-gpu-device-plugin/config.yml + + - name: check if intel-gpu device-plugin is already installed + check_mode: no + command: kubectl --kubeconfig /etc/kubernetes/admin.conf diff -f /etc/kubernetes/addons/intel-gpu-device-plugin/config.yml + failed_when: false + changed_when: false + register: kube_intel_gpu_device_plugin_diff_result + + - name: install intel-gpu device-plugin onto the cluster + when: kube_intel_gpu_device_plugin_diff_result.rc != 0 + command: kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f /etc/kubernetes/addons/intel-gpu-device-plugin/config.yml |