How to get the first element of a list from the output of setup module in Ansible?
To get first item of the list: – debug: msg: “First item: {{ ansible_processor[0] }}” Or: – debug: msg: “First item: {{ ansible_processor | first }}”
To get first item of the list: – debug: msg: “First item: {{ ansible_processor[0] }}” Or: – debug: msg: “First item: {{ ansible_processor | first }}”