return a bool instead of a list
This commit is contained in:
parent
b93b0e7ec6
commit
23e09863dc
@ -560,15 +560,15 @@ APT::Install-Suggests "0";
|
||||
|
||||
- name: set variable nvidia_detected
|
||||
set_fact:
|
||||
nvidia_detected: 'true if {{ gpus | selectattr("VendorName", "equalto", "nvidia") | list }} else false'
|
||||
nvidia_detected: '{{ gpus | selectattr("VendorName", "equalto", "nvidia") | bool }}'
|
||||
|
||||
- name: set variable intel_detected
|
||||
set_fact:
|
||||
intel_detected: 'true if {{ gpus | selectattr("VendorName", "equalto", "intel") | list }} else false'
|
||||
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") | list }} else false'
|
||||
amd_detected: 'true if {{ gpus | selectattr("VendorName", "equalto", "amd") | bool }}'
|
||||
|
||||
- debug:
|
||||
var: '{{ item }}'
|
||||
|
@ -8,15 +8,15 @@
|
||||
|
||||
- name: set variable nvidia_detected
|
||||
set_fact:
|
||||
nvidia_detected: 'true if {{ gpus | selectattr("VendorName", "equalto", "nvidia") | list }} else false'
|
||||
nvidia_detected: '{{ gpus | selectattr("VendorName", "equalto", "nvidia") | bool }}'
|
||||
|
||||
- name: set variable intel_detected
|
||||
set_fact:
|
||||
intel_detected: 'true if {{ gpus | selectattr("VendorName", "equalto", "intel") | list }} else false'
|
||||
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") | list }} else false'
|
||||
amd_detected: 'true if {{ gpus | selectattr("VendorName", "equalto", "amd") | bool }}'
|
||||
|
||||
- debug:
|
||||
var: '{{ item }}'
|
||||
|
Loading…
Reference in New Issue
Block a user