blob: f59e7784610baa8d1d4c2fcdf46833bf6d42cf65 (
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
|
- name: Install docker packages
package: name="{{ item }}" state=present
with_items:
- podman
- buildah
- skopeo
- name: Install NVIDIA packages
package: name="{{ item }}" state=present
with_items:
- nvidia-container-runtime
when: "'cuda' in group_names"
- name: Use vfs storage for system services (as overlay is still problematic)
lineinfile: dest="/etc/containers/storage.conf" regexp="driver\s*=" line="driver = \"vfs\"" state="present"
register: storage
- name: Adapt storage
when: storage is changed
block:
- name: stat /var/lib/containers/storage
stat: path=/var/lib/containers/storage
register: storage_folder
- name: Rename and set aside storage folder using older driver
command: mv /var/lib/containers/storage /var/lib/containers/storage~
when: storage_folder.stat.exists
|