Files
inventory-collector/man/inventory-collector.1
T
soda64 598e5d7397
Build and Publish Release / Build Packages and Publish (push) Successful in 9s
feat: release v1.1.0 - clean YAML, wildcard DNS protection, and tag/group/source filtering
2026-10-03 11:41:25 +02:00

78 lines
3.1 KiB
Groff

.TH INVENTORY-COLLECTOR 1 "October 2026" "inventory-collector 1.1.0" "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 \-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.