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
Support ok_when condition for tasks. #12710
Comments
I would love to see this feature as well. Trying to set a mysql_user play which will register ok instead of failed when the default blank password has already been changed by prior runs. |
Could benefit from: ansible/ansible#12710
Could benefit from: ansible/ansible#12710
We have failed_when: that you can use with a negation of the condition. Is there anything we are missing with your request that isn't solved by using failed_when? |
Did you read the summary 😉 ? The difference is that |
|
Right, except that the task would show up as |
I don't understand the argument that |
@ypid , I was happy to find this... but then sad to find out it was cancelled. :-( I too want parts of my role to show "ok" when they are skipped (because I know they are OK), rather than showing "skipped". +1 to reopen this. |
I too want parts of my role to show "ok" when they are skipped (because I know they are OK), rather than showing "skipped". +1 to reopen this. |
ISSUE TYPE
Feature Idea
COMPONENT NAME
core
ANSIBLE VERSION
CONFIGURATION
Default configuration
OS / ENVIRONMENT
Debian
SUMMARY
Add a
ok_when
condition to tasks. When it evaluates to True, dont run the task and show OK. When it evaluates to False or it is missing andwhen
evaluates to True, run the task.I know I could run the
Install WordPress plugins
task for each plugin but that is time consuming when you have a big list of plugins as thewp
command seems to have a high startup time.STEPS TO REPRODUCE
Example play which would benefit form this feature.
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: