facts

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

README

facts

Fact gathering (the 'setup' module equivalent), pure Go CGO=0.

Part of go-ansible — a pure-Go (CGO=0), functional-parity port of Ansible.

CI Go Reference License

Documentation

Overview

Package facts implements Ansible's `setup` module / gather_facts: probing a target for a portable subset of system facts (Ansible's own ansible_facts namespace) using only POSIX shell commands present on virtually every real target, no Python required.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gather

func Gather(ctx context.Context, conn remoteexec.Connection) (map[string]any, error)

Gather probes conn for a portable subset of Ansible's ansible_facts: system/kernel/architecture (uname), hostname/fqdn, distribution/ distribution_version/os_family (parsed /etc/os-release on Linux, sw_vers on macOS), date_time.epoch, processor_count, user_id, and pkg_mgr (the package manager available, for module dispatch).

The returned map's keys are bare (e.g. "system", not "ansible_system") — see vars.InjectFacts for the ansible_facts / ansible_<name> namespacing a caller applies on top.

Types

This section is empty.

Jump to

Keyboard shortcuts

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