blob: 99a2743bf061de35d7933dff810771d11f07a450 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
---
- name: Upload packaging key for docker repositories
copy:
src: docker_packaging_key.asc
dest: "{{ docker_rpm_key_path }}"
mode: 0644
- name: Import Docker CE repository gpg key
rpm_key:
key: https://download.docker.com/linux/centos/gpg
state: present
- name: Import NVIDIA Docker repository gpg keys
rpm_key:
key: "{{ nvidia_docker_repo_url }}/{{ item }}/gpgkey"
state: present
with_items: "{{ nvidia_repos }}"
- name: Configure docker repositories (yum)
yum_repository:
name: "docker-ce-{{ item }}"
description: Official docker-ce repository
baseurl: "{{ docker_repo_url }}/{{ docker_repo_subfolder }}/x86_64/{{ item }}"
gpgkey: https://download.docker.com/linux/centos/gpg
gpgcheck: yes
enabled: yes
with_items:
- stable
- 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 }}"
|