90 lines
3.6 KiB
Groff
90 lines
3.6 KiB
Groff
.TH INVENTORY-COLLECTOR 1 "October 2026" "inventory-collector 1.1.1" "User Commands"
|
|
.SH NAME
|
|
inventory-collector \- Universal homelab and fleet inventory collector and deduplicator
|
|
.SH SYNOPSIS
|
|
.B inventory-collector
|
|
[\fIOPTIONS\fR]
|
|
.SH DESCRIPTION
|
|
.B inventory-collector
|
|
is a command-line tool that dynamically queries infrastructure sources (Proxmox VE REST API, static YAML and INI inventory files), normalizes and deduplicates host records in memory, and generates unified inventory files for Ansible, linux-connector, and other fleet management tools.
|
|
.SH OPTIONS
|
|
.TP
|
|
.BR \-o ", " \-\-output " \fIFILE\fR"
|
|
Write generated inventory to \fIFILE\fR. If omitted, inventory payload is printed to standard output.
|
|
.TP
|
|
.BR \-f ", " \-\-format " \fIFORMAT\fR"
|
|
Select output format: \fIansible-yaml\fR (default), \fIansible-json\fR, \fIlinux-connector\fR, \fIyaml\fR, \fIxml\fR, or \fIini\fR. If \fB\-\-output\fR is provided, format is automatically inferred from the file extension (.xml, .ini, .json, .yaml).
|
|
.TP
|
|
.BR \-\-check ", " \-\-dry-run
|
|
Inspect discovered hosts and groups in a formatted terminal table without writing or modifying any files.
|
|
.TP
|
|
.B \-\-list
|
|
Ansible Dynamic Inventory mode. Outputs valid dynamic inventory JSON with \fB_meta.hostvars\fR to standard output, suitable for direct execution with \fIansible-playbook -i\fR. Stderr is quieted by default for clean Ansible execution.
|
|
.TP
|
|
.B \-\-sync
|
|
Synchronize inventory simultaneously to both default Ansible and linux-connector destination paths.
|
|
.TP
|
|
.BR \-t ", " \-\-tag ", " \-\-filter\-tag " \fITAG\fR"
|
|
Filter inventory hosts by tag (e.g. \fIhypervisor\fR, \fIpve\fR, \fIk3s\fR).
|
|
.TP
|
|
.BR \-g ", " \-\-group ", " \-\-category ", " \-\-filter\-group " \fIGROUP\fR"
|
|
Filter inventory hosts by group or category name (e.g. \fIproxmox_vms\fR, \fIstorage\fR).
|
|
.TP
|
|
.BR \-\-source\-type ", " \-\-filter\-source ", " \-\-origin " \fISOURCE\fR"
|
|
Filter inventory hosts by source provider (e.g. \fIproxmox\fR, \fIstatic\fR, \fIfile\fR, \fIk3s\fR).
|
|
.TP
|
|
.BR \-\-sort ", " \-\-sort\-by " \fIFIELD\fR"
|
|
Sort inventory hosts by \fIname\fR or \fIip\fR (default: \fIname\fR). IP sorting accurately evaluates IPv4 octets in mathematical order.
|
|
.TP
|
|
.BR \-r ", " \-\-reverse
|
|
Reverse the current sort order.
|
|
.TP
|
|
.BR \-\-ansible\-dest " \fIPATH\fR"
|
|
Target output path for Ansible inventory in \fB\-\-sync\fR mode (overrides configuration file).
|
|
.TP
|
|
.BR \-\-lc\-dest " \fIPATH\fR"
|
|
Target output path for linux-connector inventory in \fB\-\-sync\fR mode (overrides configuration file).
|
|
.TP
|
|
.BR \-q ", " \-\-quiet
|
|
Silence all informational and warning log messages on stderr.
|
|
.TP
|
|
.BR \-v ", " \-\-verbose
|
|
Enable verbose logging on stderr (forces output even in \fB\-\-list\fR mode).
|
|
.TP
|
|
.BR \-c ", " \-\-config " \fIFILE\fR"
|
|
Path to YAML configuration file. Defaults to \fI~/.config/inventory-collector/config.yaml\fR.
|
|
.TP
|
|
.BR \-V ", " \-\-version
|
|
Show program version and exit.
|
|
.TP
|
|
.BR \-h ", " \-\-help
|
|
Show help message and exit.
|
|
.SH ENVIRONMENT VARIABLES
|
|
.TP
|
|
.B PROXMOX_URL ", " ANSIBLE_PROXMOX_URL
|
|
Base URL of the Proxmox VE API (e.g. \fIhttps://pve-01.wired.intra:8006\fR).
|
|
.TP
|
|
.B PROXMOX_TOKEN_ID ", " ANSIBLE_PROXMOX_TOKEN_ID
|
|
API Token ID (e.g. \fIroot@pam!inventory-collector\fR).
|
|
.TP
|
|
.B PROXMOX_TOKEN_SECRET ", " ANSIBLE_PROXMOX_TOKEN_SECRET
|
|
API Token Secret UUID.
|
|
.TP
|
|
.B PROXMOX_VERIFY_SSL
|
|
Whether to verify Proxmox SSL certificate (\fItrue\fR or \fIfalse\fR, default: \fIfalse\fR).
|
|
.SH EXIT STATUS
|
|
.TP
|
|
.B 0
|
|
Success.
|
|
.TP
|
|
.B 1
|
|
Runtime error or unhandled exception.
|
|
.TP
|
|
.B 2
|
|
Proxmox API source unreachable.
|
|
.TP
|
|
.B 3
|
|
Configuration or static file syntax error.
|
|
.SH AUTHORS
|
|
inventory-collector is maintained as part of the wiredLAB infrastructure suite.
|