Compare commits

...

2 Commits

Author SHA1 Message Date
Alwin Berger ecca197cf3 fix env meaning 2024-07-15 14:28:13 +02:00
Alwin Berger 49659dce66 re-create cdi on reboot 2024-07-15 14:27:13 +02:00
3 changed files with 24 additions and 1 deletions

View File

@ -3,4 +3,4 @@
ansible.builtin.apt:
update_cache: yes
environment:
NEEDRESTART_SUSPEND: 'please no reboot now'
NEEDRESTART_SUSPEND: 'do not promt me'

View File

@ -0,0 +1,9 @@
[Unit]
Description=Rebuild cdi on boot
[Service]
Type=oneshot
ExecStart=/usr/bin/nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml
[Install]
WantedBy=multi-user.target

View File

@ -46,6 +46,20 @@
args:
creates: /etc/cdi/nvidia.yaml
- name: Create systemd unit file
template:
src: createcdi.service.j2
dest: /etc/systemd/system/createcdi.service
owner: root
group: root
mode: '0644'
- name: libnvidia-container | automatically regenerate cdi
systemd:
name: createcdi
enabled: yes
state: started
- name: Install podman
apt:
name: [ 'podman', 'podman-compose' ]