kayobe/ansible/vgpu.yml
Will Szumski bd36b5f018 Adds initial support for vGPUs
Adds support for configuring vGPUs on NVIDIA hardware.

Closes-Bug: #2028843
Change-Id: I4c8481f7429dbf50d51e26bd7acee24e16ee6c79
2023-11-30 14:33:32 +01:00

43 lines
829 B
YAML

---
- name: Configure IOMMU
hosts: iommu
tags:
- iommu
- vgpu
tasks:
- import_role:
name: stackhpc.linux.iommu
handlers:
- name: Register that a reboot is required
set_fact:
kayobe_needs_reboot: true
listen: reboot
- name: Configure NVIDIA VGPUs
hosts: vgpu
tags:
- vgpu
tasks:
- import_role:
name: stackhpc.linux.vgpu
handlers:
- name: Register that a reboot is required
set_fact:
kayobe_needs_reboot: true
listen: reboot
- name: Reboot when required
hosts: iommu:vgpu
tags:
- reboot
- iommu
- vgpu
tasks:
- name: Reboot
reboot:
reboot_timeout: "{{ vgpu_reboot_timeout }}"
become: true
when:
- kayobe_needs_reboot | default(false) | bool
- vgpu_do_reboot | bool