Need info on the commands used by ios_facts module

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

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
Resource module facts -

  • Resource module facts
  • Resource module, specific example ntp_global
    Please, refer to the doc for more reference around facts.

Thanks,
Sagar Paul
Associate Software Engineer
Red Hat, Ansible