Comments (11)
@pierocolla @eldho-varghese Did you manage to fix your problems? If not, could you open a new issue in the bug tracker? This issue has a bit too much different things going on I feel.
Ansible-CMDB is widely used, critically important, and largely abandoned by it's maintainer AFAICT :/
Yeah sorry about the lack of support and maintenance. I've been dealing with some personal problems and had extremely low motivation working on any of my open source projects. But to clarify: we're still using ansible-cmdb professionally at my job, so if it breaks it will be fixed. I'm currently picking development up again. That'll focus on maintenance for a while, to get rid of the backlog of issues, PRs and technical debt.
So instead of submitting another ignored PR
If you still feel up to it, any PRs that build out the documentation would be greatly appreciated (and merged quickly).
On https://github.com/kfiresmith/ansible-cmdb-examples you mention: "To gain on-par capability to the html_fancy template, add this block". Would it be okay if I added these columns to the default csv template? I think it should be alright under the GPL, but just to be sure I'd like your permission.
I'm closing this issue since it's been so long, I have no idea what the current status is for the problems mentioned here. If you're still experiencing issues, please file a new bug!
from ansible-cmdb.
@fboender Yes.. exporting content of host_vars and group_vars issue has been fixed. After fixing the csv template, I made the silly mistake by not defining the inventory file while running the ansible-cmdb command. SO it was not reading the host_vars files :(
Thanks to @kfiresmith for the csv.tpl entries.
from ansible-cmdb.
Hi pierocolla
I'm also struggling export the static date into a csv file. It is able to create the colums but not fetching the data. Have you able to fix it ?
from ansible-cmdb.
from ansible-cmdb.
Hi Pierocolla,
I came across a custom csv work related to ansible cmdb on https://gitlab.com/sjugge/ansible/ansible-cmdb-template-csv/-/blob/master/csv-extended.tpl
I modified the csv.tpl with the above one and it is working fine. However I want to export a few more columns into to csv by modifying the csv.tpl. I have created host_vars for each host in the inventory an it contain following data
owner: Scott
environment: Qual
hostname: server01
description: Application Server
sys_admin: Eldho Varghese
I am able to display these information in the HTML fancy page. However, adding the additional columns into csv.tpl is giving me empty columns.
{"title": "Owner", "id": "owner", "visible": True, "field": lambda h: host['hostvars'].get('owner', '')},
{"title": "Environment", "id": "environment", "visible": True, "field": lambda h: host['hostvars'].get('environment', '')},
{"title": " Description ", "id": " description ", "visible": True, "field": lambda h: host['hostvars'].get('description', '')},
{"title": " Sys_Admin ", "id": " sys_admin ", "visible": True, "field": lambda h: host['hostvars'].get('sys_admin', '')},
Would you be able to help me here ? How do I fetch these values into csv ? Looks like my above python code need a tewak
Thanks
Eldho Varghese
from ansible-cmdb.
from ansible-cmdb.
So after a bunch of trial and error, I've learned how this works for the most part, and have documented some notes on how to do this, at https://github.com/kfiresmith/ansible-cmdb-examples - perhaps this can help others in this thread who have had a hard time with the CSV template?
@pierocolla @eldho-varghese ^^
from ansible-cmdb.
@kfiresmith
I have looked at the code, I have tried the same and the csv export has the column with empty data. It is not getting any data which defined in the host_vars of each hosts.
Have you tested this successfully ?
Thanks
Eldho Varghese
from ansible-cmdb.
Hello Eldho,
I wrote a detailed example for you:
https://github.com/kfiresmith/ansible-cmdb-examples
Please copy my example and adapt for your specific columns.
You probably want to diff your column declaration with my example to see the subtle difference in how the syntax works to declare a specific custom group or host var.
from ansible-cmdb.
@eldho-varghese Nice! Glad to hear you got it working.
from ansible-cmdb.
Hello @fboender - I'm so glad to hear you are doing better!
For any of my informal contributions, yes please feel empowered to adapt and absorb them however you might see fit within the project! Attribution of some sort is always nice for my online presence, but not at all required.
I'd love to submit PRs for the documentation at some point.
from ansible-cmdb.
Related Issues (20)
- Is it possible to add additional & custom columns to the CSV template? HOT 2
- Comments must be stripped before calling shlex.split
- ModuleNotFoundError: No module named 'ansiblecmdb' HOT 2
- New column: public IP address HOT 1
- [html_fancy_split] Unable to sort custom column by mixed type "string"/ "num" AND how to custom template html_fancy_split HOT 9
- CSV import feature to manage inventory and host_vars easily HOT 1
- CSV export feature for easy reporting HOT 2
- kernel info to txt_table.tpl
- Ansible Tower Generated Json Output unable to generate report HOT 1
- No suitable python version found (v2.7 or higher required). Aborting HOT 4
- Template html fancy split is broken with Edge when excluding columns HOT 1
- Debian 11 can't use default template with ansible-cmdb 1.31 HOT 3
- F
- Markdown split doesn't work
- Does not get built with python-packaging 23.0
- [Question] Offline js libraries
- Using facts_cache for esx hosts is not working properly HOT 1
- Custom fact using command output HOT 1
- python 3.12: imp is deprecated in favor of importlib HOT 1
- bug using cmdb inside container ee
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-cmdb.