Skip to content

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
fboender committed Nov 17, 2018
1 parent f16411a commit fa764f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
15 changes: 15 additions & 0 deletions contrib/ansible-cmdb.man.1
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ Params to send to the template.
.BR \-c ", " \-\-columns =\fICOL[,COL]\fR
Show only given columns

.TP
.BR \-C ", " \-\-cust\-cols =\fPATH\fR
Add user-defined columns.

.TP
.BR \-l ", " \-\-limit =\fLIMIT\fR
Limit the included hosts to pattern LIMIT

.TP
.BR \-\-exclude\-cols =\fEXCLUDE_COLUMNS\fR
Exclude cols from output

.SH EXAMPLES

First, generate Ansible output for your hosts:
Expand Down Expand Up @@ -254,6 +266,9 @@ information on what id fields are supported by a template, take a look in the
template. Usually it's the column title, but in lowercase and with spaces
replaced by underscores.

You can add custom columns with the \fB\-C\fR (\fB\-\-cust\-cols\fR) option.
Please see the online user manual for more information.

.SH EXTENDING

You can specify multiple directories that need to be scanned for output. This
Expand Down
9 changes: 3 additions & 6 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Some templates, such as txt_table and html_fancy, support columns. If a
template supports columns, you can use the `--columns` / `-c` command line
option to specify which columns to show.

The `--columns` takes a comma-separated list of columns (no spaces!) which
The `--columns` takes a comma separated list of columns (no spaces!) which
should be shown. The columns must be specified by their `id` field. For
information on what `id` fields are supported by a template, take a look in the
template. Usually it's the column title, but in lowercase and with spaces
Expand All @@ -267,11 +267,8 @@ For example:
db03.prod.local Debian 6.0.10 192.168.58.3 0g 1
zoltar.electricmonk.nl Ubuntu 14.04 194.187.79.11 4g 2

For interactive templates (`html_fancy` and friends), the `--columns` option
merely hides the columns by default. It doesn't remove them from the output,
unlike the `csv` and other static templates. If you want to exclude columns
from `html_fancy` and friends, use the `--exclude-cols` option. It works the
same as `--columns`. For example:
You can use the `--exclude-cols` option to exclude specific columns. It works
the same as `--columns`. For example:

ansible-cmdb -t html_fancy_split \
--exclude-cols mem_usage,swap_usage,disk_usage,physdisk_size \
Expand Down

0 comments on commit fa764f9

Please sign in to comment.