Skip to content

fix(vm): read ansible-inventory host vars from the vars. annotation prefix#2594

Open
fl64 wants to merge 1 commit into
mainfrom
fix/vm/ansible-inventory-vars-prefix
Open

fix(vm): read ansible-inventory host vars from the vars. annotation prefix#2594
fl64 wants to merge 1 commit into
mainfrom
fix/vm/ansible-inventory-vars-prefix

Conversation

@fl64

@fl64 fl64 commented Jul 6, 2026

Copy link
Copy Markdown
Member

Description

d8 v ansible-inventory and the virtualization-provisioner module both build
the 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 from
provisioning.virtualization.deckhouse.io/groups. Command help, usage examples
and 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=cloud exposes
ansible_user as a host variable in d8 v ansible-inventory output — the same
key the module uses.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: vm
type: fix
summary: The d8 v ansible-inventory command uses the same VM annotations as the virtualization-provisioner module to set Ansible host variables.

…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>
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