# Need info on the commands used by ios\_facts module

**URL:** <https://forum.ansible.com/t/need-info-on-the-commands-used-by-ios-facts-module/35868>\
**Category:** Ansible Project\
**Created:** [October 14, 2021, 10:13am UTC](https://forum.ansible.com/t/need-info-on-the-commands-used-by-ios-facts-module/35868 "2021-10-14T10:13:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikram\_S](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@Vikram\_S](https://forum.ansible.com/u/Vikram_S)\
**Post date:** [October 14, 2021, 10:13am UTC](https://forum.ansible.com/t/need-info-on-the-commands-used-by-ios-facts-module/35868/1 "2021-10-14T10:13:21Z")

</div>

We plan to do ios upgrade and I am using ios\_facts module to compare/manipulate info.

There is a team to which we have given limited access to network devices and need to know what command does ios\_facts module execute on cisco devices to gather the info that it does? So we will give access to these commands to that team so that the script would work when this team runs the script using their id.

I went through several ansible documentation for network modules but the exact commands executed by ios\_facts is not mentioned anywhere. Some documentation give an idea on what type of info is gathered but the exact command is not given. Since same info can be gathered using multiple commands in cisco devices sometimes, so it is difficult to make a guess.

Thanks,

Vikram

---

<div class="post-metadata">

**Author:** ![KB-perByte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kb-perbyte/32/541_2.png) [@KB-perByte](https://forum.ansible.com/u/KB-perByte)\
**Post date:** [October 18, 2021, 8:26am UTC](https://forum.ansible.com/t/need-info-on-the-commands-used-by-ios-facts-module/35868/2 "2021-10-18T08:26:55Z")

</div>

Hey Vikram,

Facts for IOS facts are collectively made of legacy facts and resource-specific facts, specific commands based on a resource contribute to the creation of the facts, all at once.  
As per your query to understand the command that is being used to produce the facts you can find them in the below-mentioned links via navigating through the facts code.  
Legacy facts - example [interfaces](https://github.com/ansible-collections/cisco.ios/blob/27cf1c4b9b46562adaa78aff4689d429b3f0a6f9/plugins/module_utils/network/ios/facts/legacy/base.py#L185)  
Resource module facts -

- Resource module [facts](https://github.com/ansible-collections/cisco.ios/tree/main/plugins/module_utils/network/ios/facts)
- Resource module, specific example [ntp\_global](https://github.com/ansible-collections/cisco.ios/blob/main/plugins/module_utils/network/ios/facts/ntp_global/ntp_global.py#L56)  
Please, refer to the [doc](https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_facts_module.html) for more reference around facts.

Thanks,  
Sagar Paul  
Associate Software Engineer  
Red Hat, Ansible
