Basics for using Ansible.
To gather information for a specific host:
ansible $HOSTNAME -m ansible.builtin.setup