Metadata-Version: 2.4
Name: hegemony-steps-ansible
Version: 0.59.1
Summary: Ansible playbook step handler for Hegemony (inventory generated from Hegemony's inventory)
License-Expression: AGPL-3.0-or-later AND MIT
License-File: LICENSE-AGPL-3.0-or-later.txt
License-File: LICENSE-MIT.txt
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Systems Administration
Requires-Dist: hegemony-step-sdk>=1.1,<2
Requires-Dist: hegemony-steps-container==0.59.1
Requires-Python: >=3.11
Project-URL: Homepage, https://hegemony.sh
Project-URL: Documentation, https://hegemony.sh
Project-URL: Source, https://github.com/hegemony-sh/hegemony-step-plugins
Project-URL: Issues, https://github.com/hegemony-sh/hegemony-step-plugins/issues
Project-URL: Changelog, https://github.com/hegemony-sh/hegemony-step-plugins/blob/main/CHANGELOG.md
Description-Content-Type: text/markdown

<!--
SPDX-FileCopyrightText: 2025-2026 Rexonix s.r.o.
SPDX-FileContributor: Jakub Trávník <jakub.travnik@gmail.com>

SPDX-License-Identifier: AGPL-3.0-or-later
-->

# hegemony-steps-ansible

Ansible for Hegemony flows — the `ansible.` namespace.

Handlers: `ansible.playbook` — run a playbook from the flow's attachments
against the step's target devices. The inventory is generated from
Hegemony's inventory (local devices and external providers such as NetBox or
Git alike), grouped by flow role, platform, site, tag, and provider, so a
playbook needs no hand-kept hosts file. Device credentials, secret
references, and Ansible Vault passwords are resolved by the platform, handed
to Ansible as files inside the step's container, and redacted from output. Results are
recorded per device, and check mode with diff gives a dry run to review
before an approval.

The playbook runs on the platform's Docker-in-Docker sandbox through
`container.run`'s runner (this wheel depends on `hegemony-steps-container`),
under the flow's egress policy. The default execution image,
`ghcr.io/hegemony-sh/ansible-runner:0.59`, is built from `images/ansible-runner/`
in this repository and published on ghcr.io with every release (tagged
`X.Y.Z` and `X.Y`; the step names its own minor version). It has
ansible-core 2.19: the tag names a plugin release, so each run reports the
exact version in its output (`ansible_version`), and only a minor release of
the plugins moves to another ansible-core series. The step's ansible-core
version setting picks a series instead of the default: 2.19 or 2.21, each
published as its own tag (`X.Y-core2.21`). To add collections
or host it yourself, build it from `images/ansible-runner/`, push it under
your own tag, and set the step's Execution image.
Any Ansible execution environment image works.
