ansible-cmdb
ansible-cmdb copied to clipboard
Display _only_ custom columns
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.
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.