summaryrefslogtreecommitdiffstats
path: root/roles/docker/tasks/configure_dnf.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/docker/tasks/configure_dnf.yml')
-rw-r--r--roles/docker/tasks/configure_dnf.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/roles/docker/tasks/configure_dnf.yml b/roles/docker/tasks/configure_dnf.yml
new file mode 100644
index 0000000..73ecb30
--- /dev/null
+++ b/roles/docker/tasks/configure_dnf.yml
@@ -0,0 +1,18 @@
+---
+- name: Import NVIDIA Docker repository gpg keys
+ rpm_key:
+ key: "{{ nvidia_docker_repo_url }}/{{ item }}/gpgkey"
+ state: present
+ with_items: "{{ nvidia_repos }}"
+ when: "'cuda' in group_names"
+
+- name: Configure Nvidia repositories (yum)
+ yum_repository:
+ name: "{{ item }}"
+ description: Official {{ item }} repository
+ baseurl: "{{ nvidia_docker_repo_url }}/{{ item }}/{{ nvidia_docker_repo_subfolder }}/x86_64/"
+ gpgkey: "{{ nvidia_docker_repo_url }}/{{ item }}/gpgkey"
+ gpgcheck: no
+ enabled: yes
+ with_items: "{{ nvidia_repos }}"
+ when: "'cuda' in group_names"