33 lines
800 B
YAML
33 lines
800 B
YAML
- name: get information about usb and pci hardware and loaded kernel modules
|
|
hardware_facts:
|
|
usb: True
|
|
pci: True
|
|
modules: True
|
|
gpus: True
|
|
acpi_power_modes: True
|
|
|
|
- name: set variable nvidia_detected
|
|
set_fact:
|
|
nvidia_detected: '{{ gpus | selectattr("VendorName", "equalto", "nvidia") | bool }}'
|
|
|
|
- name: set variable intel_detected
|
|
set_fact:
|
|
intel_detected: 'true if {{ gpus | selectattr("VendorName", "equalto", "intel") | bool }}'
|
|
|
|
- name: set variable amd_detected
|
|
set_fact:
|
|
amd_detected: 'true if {{ gpus | selectattr("VendorName", "equalto", "amd") | bool }}'
|
|
|
|
- debug:
|
|
var: '{{ item }}'
|
|
verbosity: 1
|
|
with_items:
|
|
- usb
|
|
- pci
|
|
- gpus
|
|
- modules
|
|
- acpi_power_modes
|
|
- nvidia_detected
|
|
- intel_detected
|
|
- amd_detected
|