how to obtain ip info

I need ip, gateway and netmask info

Use ansible facts. Read about them more in the documentation section.

Can you give me a documentation?

Can you give me a documentation?

https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters_ipaddr.html

https://stackoverflow.com/questions/52291149/ansible-to-get-the-netmask-in-cidr

https://www.google.com/search?q=how+to+use+facts+in+ansible&oq=how+to+use+facts+in+ansible

https://www.oreilly.com/library/view/ansible-up-and/9781491915318/ch04.html

https://docs.ansible.com/ansible/latest/modules/setup_module.html

Also run this adhoc command to gather info about all your hosts at once, then check which variables can be used for IP related information:

ansible all -m setup | less