Skip to content

Commit

Permalink
fixed several isues with dependency problems.
Browse files Browse the repository at this point in the history
updated to use yum_repository module for k8s and nvidia repos

Signed-off-by: John lockman <[email protected]>
  • Loading branch information
John lockman committed Jan 7, 2021
1 parent 4593bba commit de81618
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 16 deletions.
47 changes: 37 additions & 10 deletions roles/common/tasks/nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,44 @@
# limitations under the License.
---

- name: Add nvidia-docker2 Repo
get_url:
url: "{{ nvidia_docker_repo_url }}"
dest: "{{ nvidia_docker_repo_dest }}"
tags: install, testing

- name: Add libnvidia container Repo
get_url:
url: "{{ nvidia_container_repo_url }}"
dest: "{{ nvidia_container_repo_dest }}"
tags: install, testing
yum_repository:
name: libnvidia-container
description: libnvidia-container
baseurl: https://nvidia.github.io/libnvidia-container/stable/centos7/$basearch
repo_gpgcheck: no
gpgcheck: no
gpgkey: https://nvidia.github.io/libnvidia-container/gpgkey
sslverify: yes
sslcacert: /etc/pki/tls/certs/ca-bundle.crt
enabled: yes
tags: install

- name: Add nvidia-container-runtime Repo
yum_repository:
name: nvidia-container-runtime
description: nvidia-container-runtime
baseurl: https://nvidia.github.io/nvidia-container-runtime/stable/centos7/$basearch
repo_gpgcheck: no
gpgcheck: no
gpgkey: https://nvidia.github.io/nvidia-container-runtime/gpgkey
sslverify: yes
sslcacert: /etc/pki/tls/certs/ca-bundle.crt
enabled: yes
tags: install

- name: Add nvidia-docker Repo
yum_repository:
name: nvidia-docker
description: nvidia-docker
baseurl: https://nvidia.github.io/nvidia-docker/centos7/$basearch
repo_gpgcheck: no
gpgcheck: no
gpgkey: https://nvidia.github.io/nvidia-docker/gpgkey
enabled: yes
sslverify: yes
sslcacert: /etc/pki/tls/certs/ca-bundle.crt
tags: install

- name: Install nvidia driver and nvidia-docker2
package:
Expand Down
16 changes: 10 additions & 6 deletions roles/k8s_common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@
---

- name: Add kubernetes repo
copy:
src: kubernetes.repo
dest: "{{ k8s_repo_dest }}"
owner: root
group: root
mode: "{{ k8s_repo_file_mode }}"
yum_repository:
name: kubernetes
description: kubernetes
baseurl: https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled: yes
gpgcheck: no
repo_gpgcheck: no
gpgkey:
- https://packages.cloud.google.com/yum/doc/yum-key.gpg
- https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
tags: install

- name: Update sysctl to handle incorrectly routed traffic when iptables is bypassed
Expand Down

0 comments on commit de81618

Please sign in to comment.