inventory

package
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package inventory converts honey host records into Ansible-compatible JSON inventory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnsibleHostVars

func AnsibleHostVars(records []hosts.Record, ansibleUser, hostname string, stripPrefix bool, blacklist []string) (map[string]any, error)

AnsibleHostVars returns host variables for a single inventory hostname (dynamic inventory `--host`).

func AnsibleList

func AnsibleList(records []hosts.Record, ansibleUser string, stripPrefix bool, blacklist []string) map[string]any

AnsibleList builds the JSON object returned for `ansible-inventory` / dynamic inventory `--list`. Groups: honey (all hosts), honey_provider_<p>, honey_region_<r>, honey_zone_<z> when fields are set. Each host gets ansible_host from PrimaryIP when non-empty; connection falls back to the inventory name when empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL