yavdr-ansible/roles/collect-facts/tasks/main.yml

33 lines
808 B
YAML
Raw Normal View History

- 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:
2017-11-22 08:07:29 +01:00
nvidia_detected: 'true if {{ gpus | selectattr("VendorName", "nvidia") | list }} else false'
- 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'
- 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'
- debug:
var: '{{ item }}'
verbosity: 1
with_items:
- usb
- pci
- gpus
- modules
- acpi_power_modes
- nvidia_detected
- intel_detected
- amd_detected