Repository navigation
feat: Bolt inventory plugin - #7
Merged
Merged
Conversation
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>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the module a Bolt inventory plugin:
_plugin: noderingsininventory.yamllists the organization's NodeRings VMs as Bolt targets.bolt_plugin.jsonplus a privateresolve_referencetask. The task reuses the module's plain-Ruby API client (PuppetX::Noderings::Client), so Bolt users need nothing beyondbolt module add noderings-noderings.token(sensitive; defaults toNODERINGS_TOKENon the controller),api_url,organization_id,tags,power_states(default[running]),name_pattern, andtarget_mappingforname/uri/alias/features/config/facts/vars. Every target also gets the VM data as thenoderingsfact.boltandinventory.Tested:
_installdirlayout,_erroroutput).tasks/andbolt_plugin.json.bolt inventory showlisted the account's VM with mapped vars and facts.bolt command runover SSH on that target returned its hostname, uptime and OS. Apower_states: [stopped]group returned 0 targets, and a bad token gave a clear 401 error.