2017-11-20 09:20:30 +01:00
|
|
|
- name: get information about usb and pci hardware and loaded kernel modules
|
|
|
|
hardware_facts:
|
|
|
|
usb: True
|
|
|
|
pci: True
|
|
|
|
modules: True
|
|
|
|
gpus: True
|
2017-11-20 09:21:22 +01:00
|
|
|
acpi_power_modes: True
|
2017-11-21 11:30:03 +01:00
|
|
|
|
|
|
|
- name: set variable nvidia_detected
|
|
|
|
set_fact:
|
2017-11-22 08:07:29 +01:00
|
|
|
nvidia_detected: 'true if {{ gpus | selectattr("VendorName", "nvidia") | list }} else false'
|
2017-11-21 11:30:03 +01:00
|
|
|
|
|
|
|
- name: set variable intel_detected
|
|
|
|
set_fact:
|
2017-11-22 08:07:29 +01:00
|
|
|
intel_detected: 'true if {{ gpus | selectattr("VendorName", "intel") | list }} else false'
|
2017-11-21 11:30:03 +01:00
|
|
|
|
|
|
|
- name: set variable amd_detected
|
|
|
|
set_fact:
|
2017-11-22 08:07:29 +01:00
|
|
|
amd_detected: 'true if {{ gpus | selectattr("VendorName", "amd") | list }} else false'
|
2017-11-21 11:30:03 +01:00
|
|
|
|
2017-11-20 09:20:30 +01:00
|
|
|
- debug:
|
|
|
|
var: '{{ item }}'
|
|
|
|
verbosity: 1
|
|
|
|
with_items:
|
|
|
|
- usb
|
|
|
|
- pci
|
|
|
|
- gpus
|
|
|
|
- modules
|
2017-11-20 09:21:22 +01:00
|
|
|
- acpi_power_modes
|
2017-11-21 11:30:03 +01:00
|
|
|
- nvidia_detected
|
|
|
|
- intel_detected
|
|
|
|
- amd_detected
|