Some templates support parameters that influence their output. Parameters customize template behavior without requiring custom template files.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fboender/ansible-cmdb/llms.txt
Use this file to discover all available pages before exploring further.
Specifying Parameters
Use the-p or --params option with comma-separated key=value pairs:
Examples
html_fancy Parameters
The defaulthtml_fancy template supports these parameters:
local_js
Values:0 (default) or 1
Load JavaScript libraries from local disk instead of CDN:
- Offline environments without internet access
- Security policies prohibit external resources
- Faster loading in air-gapped networks
collapsed
Values:0 (default) or 1
Collapse all host details by default:
- Large numbers of hosts (>100)
- Overview table is more important than details
- Faster initial page load
host_details
Values:1 (default) or 0
Control whether host details are rendered at all:
- Only need the overview table
- Significantly reduce file size
- Faster rendering for large environments (>500 hosts)
With
host_details=0, clicking host names in the table has no effect.skip_empty
Values:0 (default) or 1
Skip hosts for which no facts were gathered:
- Filter out unreachable hosts
- Only show hosts with complete information
- Clean up output after failed fact gathering
- Hosts without
ansible_factskey - Hosts with gathering errors
- Manually added hosts without facts
html_fancy_split Parameters
Thehtml_fancy_split template accepts the same parameters as html_fancy:
cmdb/ directory instead of a single file.
Common Parameter Combinations
Offline Environment
Large Environment Optimization
Overview Only
Production Report
Using Parameters in Custom Templates
Access parameters in custom templates via theparams dictionary:
Boolean Parameters
Use theto_bool() utility to convert parameter strings:
- True:
1,true,True,yes,Yes - False:
0,false,False,no,No
String Parameters
Numeric Parameters
Parameter Validation
Validate parameters in your templates:Built-in Template Parameters Reference
html_fancy & html_fancy_split
| Parameter | Type | Default | Description |
|---|---|---|---|
local_js | Boolean | 0 | Load resources from local disk |
collapsed | Boolean | 0 | Collapse host details by default |
host_details | Boolean | 1 | Render host details sections |
skip_empty | Boolean | 0 | Skip hosts without facts |
Other Templates
Most other templates (txt_table, csv, json, markdown, sql) do not currently support parameters. They generate output in a fixed format.
Combining with Other Options
Parameters work with all other ansible-cmdb options:See Also
- Custom Templates - Create templates that accept parameters
- Templates Overview - Available built-in templates
- Command Reference - Common usage patterns