Skip to content

feat: Bolt inventory plugin - #7

Merged
shaygun merged 1 commit into
mainfrom
feat/bolt-inventory
Nov 27, 2026
Merged

shaygun merged 1 commit into
mainfrom
feat/bolt-inventory

Conversation

@shaygun

@shaygun shaygun commented Nov 27, 2026

Copy link
Copy Markdown
Member

Makes the module a Bolt inventory plugin: _plugin: noderings in inventory.yaml lists the organization's NodeRings VMs as Bolt targets.

  • bolt_plugin.json plus a private resolve_reference task. The task reuses the module's plain-Ruby API client (PuppetX::Noderings::Client), so Bolt users need nothing beyond bolt module add noderings-noderings.
  • Options: token (sensitive; defaults to NODERINGS_TOKEN on the controller), api_url, organization_id, tags, power_states (default [running]), name_pattern, and target_mapping for name/uri/alias/features/config/facts/vars. Every target also gets the VM data as the noderings fact.
  • README section, REFERENCE regenerated, metadata tags bolt and inventory.

Tested:

  • 9 new unit specs against the in-memory API, including running the task script itself the way Bolt does (_installdir layout, _error output).
  • rubocop clean; the module build includes tasks/ and bolt_plugin.json.
  • Live with Bolt 4.0.0 against the real API: bolt inventory show listed the account's VM with mapped vars and facts. bolt command run over SSH on that target returned its hostname, uptime and OS. A power_states: [stopped] group returned 0 targets, and a bad token gave a clear 401 error.

The module is now a Bolt inventory plugin: _plugin: noderings in
inventory.yaml lists the organization's VMs as Bolt targets, filtered by
tags, power state and hostname, with a target_mapping for name, uri,
config, facts and vars. Every target gets the VM's data as the noderings
fact. The resolve_reference task reuses the module's API client.

Signed-off-by: Shaygun <17057583+shaygun@users.noreply.github.com>
@shaygun
shaygun merged commit 9b285c1 into main Nov 27, 2026
19 checks passed
@shaygun
shaygun deleted the feat/bolt-inventory branch November 27, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant