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
Make sure all tasks get evaluated by matchtask including block/always/rescue and nested tasks #2031
Conversation
My impression is that the correct implementation would be to use matchplay should only look at play level stuff and not go into tasks/pre_tasks/post_tasks, as these are supported to be handled by matchtask. Note: I am not 100% sure that is correct, but that I how i remember it to be aimed to work. |
Thank you for your point. I did some testing and confirmed that However, it seems that the - hosts: 'localhost'
gather_facts: true
pre_tasks:
- block:
- name: 'Pre task'
debug: msg="{{ FOO }}"
vars:
FOO: fooo1
|
Therefore we might have to overwrite the matchtasks (not but |
In fact I imagine that you might want to modify original @cognifloyd WDYT? |
Yes. Please use If I did something similar when I added access to the raw task. |
Thanks, understood. I will not override it but modify the base |
If you succeed you will make lots of people happy because it will fix similar bugs on lots of rules. Do not get scared if you see some test failing, you will likely have to update the tests when you implement it. |
The
|
Hmm. What about modifying
|
Or even |
I'm not sure which approach will be most promising. Thank you for working on this / experimenting to figure out how it might be fixed! |
Thank you for the information! Let me dig into these functions. |
FYI, I found |
…_tasks on playbook
Updated
These commit fix it and we can see some violations as follows:
|
Hi @cognifloyd, I've added tests for |
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.
Fix #1895.