--- - name: Gather facts from discovered hosts hosts: all tasks: - name: Collect facts ansible.builtin.setup: - name: Display gathered facts ansible.builtin.debug: var: ansible_facts