-t or --template option.
Format Overview
html_fancy
Dynamic, modern HTML page with searchable, sortable host tables
html_fancy_split
Split HTML output with separate files for each host
txt_table
Quick text table summary with minimal host information
json
Complete JSON export of all hosts, groups, and variables
csv
CSV spreadsheet format for host data
markdown
Host information formatted in Markdown
markdown_split
Split Markdown output with separate files for each host
sql
SQL file for importing into SQLite or MySQL databases
html_fancy
Default template. A fancy HTML page that uses jQuery and DataTables to give you a searchable, sortable table overview of all hosts with detailed information just a click away.Usage
Parameters
The html_fancy template accepts optional parameters:local_js=0|1: Load resources from local disk (default=0). If set, will load resources from the local disk instead of over the network.collapsed=0|1: Controls whether host information is collapsed by default or not. A value of1will collapse all host information by default (default=0).host_details=0|1: Render host details or not (default=1).skip_empty=0|1: Skip hosts for which no facts were gathered (unreachable, etc) (default=0).
Example with Parameters
html_fancy_split
This template is basically the same as the html_fancy template, but it generates acmdb/ directory with an index.html file and a separate html file for each host’s details. This is useful if you have a large amount of hosts and the html_fancy template is rendering too slow.
Usage
cmdb/ directory with:
index.html- Main overview page[hostname].html- Individual host detail pages
Parameters
Accepts the same parameters as thehtml_fancy template:
local_js=0|1: Load resources from local disk (default=0)collapsed=0|1: Controls whether host information is collapsed by default (default=0)host_details=0|1: Render host details or not (default=1)skip_empty=0|1: Skip hosts for which no facts were gathered (default=0)
txt_table
A quick text table summary of the available hosts with some minimal information. Outputs plain text suitable for terminal display.Usage
Column Support
The txt_table template supports custom column selection. See Column Reference for available columns.json
Dumps all hosts including groups, variables, and custom info in JSON format. Perfect for programmatic access or integration with other tools.Usage
Output Structure
The JSON output includes:- Complete host facts
- Group memberships
- Host variables
- Custom variables and facts
csv
The CSV template outputs a CSV file of your hosts. Can be imported into spreadsheet applications or other tools.Usage
markdown
The Markdown template generates host information in Markdown format, suitable for documentation or wiki pages.Usage
markdown_split
Similar to html_fancy_split, this template generates a directory with a main index file and separate Markdown files for each host’s details.Usage
index.md- Main overview page[hostname].md- Individual host detail pages
sql
The SQL template generates an.sql file that can be loaded into an SQLite or MySQL database.
Usage
Loading into MySQL
Loading into SQLite
Selecting a Format
Choose your output format based on your use case:- Interactive browsing: Use
html_fancyfor the best experience - Large inventories: Use
html_fancy_splitormarkdown_splitfor better performance - Quick checks: Use
txt_tablefor terminal-friendly output - Automation/Integration: Use
jsonfor programmatic access - Reporting: Use
csvfor spreadsheet analysis - Documentation: Use
markdownfor wiki or docs - Database analysis: Use
sqlfor database querying