# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. --- - name: add Nvidia container runtime support get_url: url: https://nvidia.github.io/nvidia-container-runtime/centos7/nvidia-container-runtime.repo dest: /etc/yum.repos.d/nvidia-container-runtime.repo tags: install, testing - name: disable gpg key for nvidia-container-runtime replace: path: /etc/yum.repos.d/nvidia-container-runtime.repo regexp: 'repo_gpgcheck=1' replace: 'repo_gpgcheck=0' backup: yes tags: install - name: install Nvidia-container-runtime-hook package: name: - kmod-nvidia - nvidia-container-runtime-hook - nvidia-docker2 state: present tags: install - name: Set nvidia as default runtime copy: src=daemon.json dest=/etc/docker/ owner=root group=root mode=644 tags: install - name: Restart and Enable docker service service: name: docker state: restarted enabled: yes tags: install - name: Restart and Enable Kubernetes - kubelet service: name: kubelet state: restarted enabled: yes tags: install