New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update TaskInclude _raw_params with the expanded/templated path to file #39365
Conversation
The test
|
Additional context about this change: #34665 (comment)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…ile (ansible#39365) * Update TaskInclude _raw_params with the expanded/templated path to file * Add tests to validate host vars include paths
…ile (ansible#39365) * Update TaskInclude _raw_params with the expanded/templated path to file * Add tests to validate host vars include paths
…ile (ansible#39365) * Update TaskInclude _raw_params with the expanded/templated path to file * Add tests to validate host vars include paths
…ile (ansible#39365) * Update TaskInclude _raw_params with the expanded/templated path to file * Add tests to validate host vars include paths
…ile (ansible#39365) * Update TaskInclude _raw_params with the expanded/templated path to file * Add tests to validate host vars include paths
…ath to file (ansible#39365)" This reverts commit 4b01b92.
* Revert " Update TaskInclude _raw_params with the expanded/templated path to file (ansible#39365)" This reverts commit 4b01b92. * Improve error messaging, catch error templating parent path (cherry picked from commit c403f01)
* Revert " Update TaskInclude _raw_params with the expanded/templated path to file (ansible#39365)" This reverts commit 4b01b92. * Improve error messaging, catch error templating parent path
…ile (ansible#39365) * Update TaskInclude _raw_params with the expanded/templated path to file * Add tests to validate host vars include paths
SUMMARY
Update TaskInclude _raw_params with the expanded/templated path to file
Fixes #34665
Before this change, if a parent include used a hostvar in the path for the included file, an
AnsibleUndefinedVariable
error would happen, due toansible.playbook.helpers.load_list_of_tasks
not having host context.This PR resolves this by updating
_raw_params
ofTaskInclude
s as their results are processed, so thatload_list_of_tasks
has an expanded/templated path.ISSUE TYPE
COMPONENT NAME
lib/ansible/playbook/included_file.py
ANSIBLE VERSION
ADDITIONAL INFORMATION