yavdr-ansible/roles/collect-facts/tasks/main.yml
2017-11-22 08:50:51 +01:00

33 lines
841 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: 'true if {{ gpus | selectattr("VendorName", "equalto", "nvidia") | list }} else false'
- name: set variable intel_detected
set_fact:
intel_detected: 'true if {{ gpus | selectattr("VendorName", "equalto", "intel") | list }} else false'
- name: set variable amd_detected
set_fact:
amd_detected: 'true if {{ gpus | selectattr("VendorName", "equalto", "amd") | list }} else false'
- debug:
var: '{{ item }}'
verbosity: 1
with_items:
- usb
- pci
- gpus
- modules
- acpi_power_modes
- nvidia_detected
- intel_detected
- amd_detected