You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation does only mention variables that are set in the playbook-context. But as Ansible allows also to set this variable in other ways - I would have expected it to work either way.
Two solutions come to my mind:
Either update the documentation, so it explicitly mentions that inventory-vars DO NOT work.
Or check the hostvars for ara_playbook_labels - I might supply a PR that enables this behaviour
The text was updated successfully, but these errors were encountered:
NiceRath
changed the title
ara_playbook_labels not added
ara_playbook_labels from inventory-vars not added
Jan 20, 2025
NiceRath
changed the title
ara_playbook_labels from inventory-vars not added
feat: ara_playbook_labels from inventory-vars
Jan 20, 2025
I understand that these labels are not host-specific, but specific to the execution.
But we should be able to iterate through the hostvars and extend the list of labels by all that we find..
What is the issue ?
It seems this might be feature-request as the current handling of
ara_playbook_labels
does not handlehostvars
aka inventory-vars.We try to pass some inventory-specific & group-specific labels to the ARA-client.
To ensure these are set as expected - we assert it inside our playbook:
But when I check-out the
play_vars
- the variable is not set?At: https://github.com/ansible-community/ara/blob/master/ara/plugins/callback/ara_default.py#L511
It Prints:
When in the play_vars - the variable exists. But it seems to be nested under
hostvars
.What should be happening ?
The documentation does only mention variables that are set in the playbook-context. But as Ansible allows also to set this variable in other ways - I would have expected it to work either way.
Two solutions come to my mind:
ara_playbook_labels
- I might supply a PR that enables this behaviourThe text was updated successfully, but these errors were encountered: