# Capturing information from nodes without Python

**URL:** <https://forum.ansible.com/t/capturing-information-from-nodes-without-python/27492>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [May 9, 2018, 2:54pm UTC](https://forum.ansible.com/t/capturing-information-from-nodes-without-python/27492 "2018-05-09T14:54:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Hickok](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Matt\_Hickok](https://forum.ansible.com/u/Matt_Hickok)\
**Post date:** [May 9, 2018, 2:54pm UTC](https://forum.ansible.com/t/capturing-information-from-nodes-without-python/27492/1 "2018-05-09T14:54:14Z")

</div>

Hello,

Let me preface this with ‘I have no idea what I’m doing’.

So I am trying to figure out how to gather facts from Linux devices which do not have Python installed. I think this means the setup module cannot run so I would need to get information by using the raw module and just capturing the information as the stdout of the job?

First of all, is that even the right way to go about this?

Secondly, I am purely interacting with AWX via the API. So if I need to access this information and I capture it from the result of the job, I have no idea how to relate the information captured with the host that the information was collected from.

Any guidance here would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [May 9, 2018, 3:06pm UTC](https://forum.ansible.com/t/capturing-information-from-nodes-without-python/27492/2 "2018-05-09T15:06:16Z")

</div>

You can still leverage awx fact cache [http://docs.ansible.com/ansible-tower/latest/html/userguide/job\_templates.html#fact-caching](http://docs.ansible.com/ansible-tower/latest/html/userguide/job_templates.html#fact-caching) paired with ansible set\_fact and cacheable: true [http://docs.ansible.com/ansible/latest/modules/set\_fact\_module.html](http://docs.ansible.com/ansible/latest/modules/set_fact_module.html)

- hosts: all  
gather\_facts: false  
tasks:

- raw: “cat /proc/cpuinfo”  
register: fact\_cpu\_info

- set\_fact:  
cacheable: true  
foo: “bar”  
something: “else”  
cpu\_info: “{{ fact\_cpu\_info }}”

After running a job template with fact cache enabled in AWX you can view the facts for the host at api/v2/hosts//ansible\_facts/

---

<div class="post-metadata">

**Author:** ![Matt\_Hickok](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Matt\_Hickok](https://forum.ansible.com/u/Matt_Hickok)\
**Post date:** [May 9, 2018, 4:43pm UTC](https://forum.ansible.com/t/capturing-information-from-nodes-without-python/27492/3 "2018-05-09T16:43:22Z")

</div>

Thank you Chris, that’s incredibly helpful.

This will be incredibly common in my situation and we’ll need to gather anywhere from 10-30 pieces of information per device (all without python). It seems like making a module that does this and parses the information would make sense. But before I embark on that journey, it seems like someone would have already done this. I see plenty of modules that work against things without python (mainly networking related), but nothing for Linux devices that ‘can’t’ run python. Am I just not finding it or does something like that not exist?

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [May 9, 2018, 5:25pm UTC](https://forum.ansible.com/t/capturing-information-from-nodes-without-python/27492/4 "2018-05-09T17:25:45Z")

</div>

That sort of question is best asked on the Ansible mailing list. Your observation is correct, network modules are the largest set of modules that presume the remote node doesn’t have python. It’s not a priority for core to support a system where the remote machine doesn’t have python.
