summaryrefslogtreecommitdiffstats
path: root/roles/docker/tasks/install_podman.yml
blob: f8c779738fde4f7036a828e50f5f3f87227bf2eb (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
- 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"

#https://github.com/moby/moby/issues/38729
- name: Disable cgroups until fixes for root-less mode are landed in CentOS
  ini_file: dest="/etc/nvidia-container-runtime/config.toml"  section="nvidia-container-cli" option="no-cgroups" value="true" backup="no" create="no" state="present"
  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