-
Notifications
You must be signed in to change notification settings - Fork 465
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
Support for network facts #182
Comments
Seems that it would be possible with custom templates. https://ansible-cmdb.readthedocs.io/en/latest/usage/#custom-templates |
Adding columns by creating custom templates is a bit involved right now. I'm currently looking into an easier method of adding custom columns. Probably this will be something like a configuration file containing simple column definitions that you can pass with a parameter. The columns would then automatically be added to the selected template. |
I've implemented a Documentation can be found here (You may need to refresh the page at ReadTheDocs to bypass caching). I think this should be enough functionality to implement the custom columns you'd like to see. Can you give it a try, see if everything is working as expected and is clearly documented? If you need any help, please let me know. |
Nice! Can it read the json data from ansible output from ie. ios facts? Seems so! "jsonxs": "ansible_facts.ansible_apparmor.status" I have to try this asap :) |
Yes, this shouldn't be a problem. I don't know if IOS facts are native to ansible, or if you're creating custom facts with |
Is the patch avail via pip install?
|
No not yet. You'll have to git clone master or wait for the new release. I've also made some changes to make the feature more powerful (template fragments in the column definition) which I still need to test and document. |
I've made a few small changes in the custom columns functionality:
I'll be releasing a new version of Ansible-cmdb soon. If you want to try it in the meantime, you'll have to use the git I'm going to go ahead and close this issue. If you run into any problems or need any additional help, don't hesitate to reopen this issue! |
Can you see whats wrong with the formatting here? /usr/bin/ansible-cmdb -C cust_cols.json out/ >overview.html |
example of inventory json { |
|
This doesnt work any more. the custom coloums are there but there is no data visible |
Hello everyone, ansible-cmdb is very useful, just a question on this if this can be customized for ios_facts? This would be very helpful for us network engineers. Thanks a lot! :) |
Ansible-cmdb is hardcoded for the columns:
" Name Groups Cust DTAP Comment Ext ID FQDN Main IP All IPv4 All IPv6 OS Kernel Arch Virt CPU type vCPUs RAM [GiB] Mem Usage Swap Usage Disk usage PhysDisk size Nr of Ifaces Timestamp Product Name Product Serial"
if one wants this to work with out put from ie ios_facts you need to adjust the columns to ie:
"ansible_net_hostname"
"ansible_net_serialnum"
"ansible_net_model"
"ansible_net_stacked_models"
"ansible_net_stacked_serialnums"
"ansible_net_version"
Is this possible?
The text was updated successfully, but these errors were encountered: