-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Dynamically excluded tasks are still evaluated #31593
Comments
You seem to be mixing terms here. You reference |
I'm sorry, I copied the playbook in the wrong version. I tried |
An updated playbook that uses both:
|
I've also put together a gist to show this behavior: https://gist.github.com/sivel/a49acdc41faa609274ed11141b6e99eb |
One further note: The commit has also been cherry-picked to the stable-2.4 branch, which is where I noticed it initially: |
An incorrect removal of a conditional resulted in include_tasks falling through to the old static detection mechanism incorrectly. This restores the previous conditional check. Fixes ansible#31593
An incorrect removal of a conditional resulted in include_tasks falling through to the old static detection mechanism incorrectly. This restores the previous conditional check. Fixes #31593
An incorrect removal of a conditional resulted in include_tasks falling through to the old static detection mechanism incorrectly. This restores the previous conditional check. Fixes ansible#31593
An incorrect removal of a conditional resulted in include_tasks falling through to the old static detection mechanism incorrectly. This restores the previous conditional check. Fixes ansible#31593
ISSUE TYPE
COMPONENT NAME
include_tasks
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Fedora 24, running local playbook
SUMMARY
The include_tasks feature does not behave as expected. Particularly the 'dynamic' aspect that is emphasized in the documentation does not work.
Executing the playbook.yml posted below:
It seems to me that the pre 2.4 behavior is still present - the condition is simply applied to every single included task, instead of dynamically skipping the include due to the failing conditional.
The documentation here suggests a different behavior.
STEPS TO REPRODUCE
playbook.yml:
include.yml:
EXPECTED RESULTS
Expected something along those lines:
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: