Gathering facts when the target does not have Python or internet access?

I’m looking to use Ansible as a way of gathering information about nodes on a network – things like CPU architecture, kernel, basic things that would be captured by the setup module.

While all of these devices will be running some flavor of Linux, none of them will be internet connected and none of them will have Python.

How do people go about this? I would assume by issuing raw commands or developing modules…but I wanted to ask before going off the deep end.

Thanks!

(ps I already asked this question on r/ansible but I want to get as many opinions as possible)

Ansible is limited to raw and script actions when the target does not
have python. But using either of those can get you any info you need
as long as you don't require privilege escalation.

Ok. So out of curiosity, how do modules like ios_facts work? Are they just wrappers around raw commands and script actions?

Networking modules like that one mostly execute on the 'controller'
and use their own connection to the remote appliance to send lists of
commands.
Their 'connecitons' are handled in a special manner and not how
Ansible normally uses connection plugins.