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 wait_for return matched groups defined in search_regex. Closes #… #47690
Make wait_for return matched groups defined in search_regex. Closes #… #47690
Conversation
Hi @bjorm, thank you for submitting this pull-request! |
This comment has been minimized.
This comment has been minimized.
- Use output_dir instead of hardcoded /tmp for temp files - Sleep for only 3s instead of 10s - Revert indent change
|
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.
The only thing I noticed from the tests was that in most cases it was written as {{ output_dir }}
but in some cases {{ output_dir}}
or {{output_dir}}
. However since it's in the integration tests, I don't think it's a real problem.
@@ -98,7 +121,7 @@ | |||
- "waitfor.msg == 'fail with custom message'" | |||
|
|||
- name: setup start SimpleHTTPServer | |||
shell: sleep 10 && cd {{ files_dir }} && {{ ansible_python.executable }} {{ output_dir}}/testserver.py {{ http_port }} | |||
shell: sleep 3 && cd {{ files_dir }} && {{ ansible_python.executable }} {{ output_dir}}/testserver.py {{ http_port }} |
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.
Why change sleep here? It seems like that might have been tuned for timing in CI or similar. If it's just to take less time maybe we should change it in a separate PR.
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.
And the same comment for all the other timing changes.
A change like this should get a changelog fragment. You can look at files in https://github.com/ansible/ansible/tree/devel/changelogs/fragments for what it should look like. This should be listed as a minor_changes as it adds a minor feature to a module. |
ansible#47690) * Make wait_for return matched groups defined in search_regex. Closes ansible#25020. * Fix formatting issues. * Fix issues raised in review. - Use output_dir instead of hardcoded /tmp for temp files - Sleep for only 3s instead of 10s - Revert indent change
ansible#47690) * Make wait_for return matched groups defined in search_regex. Closes ansible#25020. * Fix formatting issues. * Fix issues raised in review. - Use output_dir instead of hardcoded /tmp for temp files - Sleep for only 3s instead of 10s - Revert indent change
…25020.
SUMMARY
Fixes #25020
Add module return values
match_groups
andmatch_groupdict
that contain any matched groups defined insearch_regex
.ISSUE TYPE
COMPONENT NAME
wait_for
ANSIBLE VERSION
ADDITIONAL INFORMATION