fix(vm): read ansible-inventory host vars from the vars. annotation prefix#2594
Open
fl64 wants to merge 1 commit into
Open
fix(vm): read ansible-inventory host vars from the vars. annotation prefix#2594fl64 wants to merge 1 commit into
fl64 wants to merge 1 commit into
Conversation
…refix The d8 v ansible-inventory command read host variables from the bare provisioning.virtualization.deckhouse.io/ prefix, while the virtualization-provisioner module reads them from the separate vars.provisioning.virtualization.deckhouse.io/ prefix. The same VM annotations produced different inventories depending on the tool. Read host variables from the vars. prefix to match the module. Groups still come from provisioning.virtualization.deckhouse.io/groups. Update the command help, usage examples and the ansible-inventory FAQ. Signed-off-by: Pavel Tishkov <pavel.tishkov@flant.com>
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.
Description
d8 v ansible-inventoryand thevirtualization-provisionermodule both buildthe Ansible inventory from VM annotations, but used different keys for host
variables. This aligns the CLI with the module: host variables are read from the
vars.provisioning.virtualization.deckhouse.io/prefix, and groups fromprovisioning.virtualization.deckhouse.io/groups. Command help, usage examplesand the FAQ are updated to match.
Why do we need it, and what problem does it solve?
So that the CLI and the module treat inventory annotations the same way — the
same annotations produce the same inventory regardless of which one generates it.
What is the expected result?
Annotating a VM with
vars.provisioning.virtualization.deckhouse.io/ansible_user=cloudexposesansible_useras a host variable ind8 v ansible-inventoryoutput — the samekey the module uses.
Checklist
Changelog entries