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

Display _only_ custom columns #206

Open
Ondjultomte opened this issue Sep 10, 2019 · 1 comment
Open

Display _only_ custom columns #206

Ondjultomte opened this issue Sep 10, 2019 · 1 comment

Comments

@Ondjultomte
Copy link

Is there a way to view only custom coloumns. exclude alla standard coloumns can be used but it would be nice to have ir -Cx to only have the custom ones in the output.

@fboender
Copy link
Owner

fboender commented Sep 5, 2021

That's not possible (yet). For now you'll have to specify the custom columns in the --columns parameter. You could use a little wrapper script to automatically fetch the columns from the custom column definition file:

#!/bin/sh

CUST_COLS="$(grep '"id":' cust_cols.conf | cut -d":" -f2 | sed 's/.*"\(.*\)".*/\1/' | tr '\n' ',')"
ansible-cmdb --cust-cols ./cust-cols.conf --columns $CUST_COLS --out/

I'll see about implementing a special switch for this in the future, but it's going to be low priority for now I'm afraid.

@fboender fboender changed the title Display _only_ custom coloumns Display _only_ custom columns Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants