GithubHelp home page GithubHelp logo

Comments (11)

fboender avatar fboender commented on June 29, 2024 2

@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.

@kfiresmith

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.

eldho-varghese avatar eldho-varghese commented on June 29, 2024 1

@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.

eldho-varghese avatar eldho-varghese commented on June 29, 2024

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.

pierocolla avatar pierocolla commented on June 29, 2024

from ansible-cmdb.

eldho-varghese avatar eldho-varghese commented on June 29, 2024

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.

pierocolla avatar pierocolla commented on June 29, 2024

from ansible-cmdb.

kfiresmith avatar kfiresmith commented on June 29, 2024

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.

eldho-varghese avatar eldho-varghese commented on June 29, 2024

@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.

kfiresmith avatar kfiresmith commented on June 29, 2024

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.

fboender avatar fboender commented on June 29, 2024

@eldho-varghese Nice! Glad to hear you got it working.

from ansible-cmdb.

kfiresmith avatar kfiresmith commented on June 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.