Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: support network ansible_facts data structure #218

Open
r1k0 opened this issue May 11, 2020 · 0 comments
Open

feature request: support network ansible_facts data structure #218

r1k0 opened this issue May 11, 2020 · 0 comments

Comments

@r1k0
Copy link

r1k0 commented May 11, 2020

Hello,

Thanks for the project it works well.

I was hoping to share the need for an enhancement, I would like to run:

$ ansible -m setup --tree out/ linux
$ ansible -m ios_facts --tree out/ ios
$ ansible -m nxos_facts --tree out/ nxos
$ ansible-cmdb out/ > overview.html

where linux/ios/nxos/etc.. are inventory groups of said platforms.

clearly the facts data structure between setup and network is different but not that much, i.e.:
setup -> ansible_hostname
network (ios_facts/nxos_facts/etc..) -> ansible_net_hostname
(i think network modules inherits from 'connection: network')

So, my request is less specific to a platform but more about a way to feed ansible_facts network data structure and have ansible-cmdb.py do the job the same way it does now.

In the end, my overview.html page would have a mix of different devices/platforms (ios_facts/nxos_facts/bigip_facts or any _facts module), each displaying its specific data structure (when it's a network device, display columns from the network device template, when it's a linux, keep things as they are) ). Could work with a lame check such as: if ansible_net_hostname exists, then use the network template (which has less columns - a default ansible_net_hostname and maybe some comon top level like ansible_net_interfaces) (I assume ansible_hostname and ansible_net_hostname can never co exist - makes sense but i dont know for sure).

Let me know your thoughts on this enhancement. It feels like a minor change but specific enough that it's not obvious to me yet where to make the change. Also you might have suggestions ;)

Thanks for your time and keep up the good work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant