-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
Add pid tracking to async_wrapper, add terminate functionality to async_status #77196
base: devel
Are you sure you want to change the base?
Conversation
---
- hosts: localhost
gather_facts: false
tasks:
- command: sleep 100
async: 100
poll: 0
register: result
- async_status:
jid: '{{ result.ansible_job_id }}'
- async_status:
jid: '{{ result.ansible_job_id }}'
mode: terminate
- async_status:
jid: '{{ result.ansible_job_id }}'
register: fail_result
ignore_errors: true
- assert:
that:
- fail_result is failed |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
type: str | ||
choices: [ cleanup, status ] | ||
choices: [ cleanup, status, terminate ] |
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.
we should add note that 'terminate' was added in version 2.13
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.
or move to 'dictionary' choices which can have their own version_added
finished=data['finished'], | ||
msg="Missing pid, cannot terminate" | ||
) | ||
else: |
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.
can remove this else:
Hi. Still working on this ? If not, would you mind me picking it up and trying to get it merged ? |
SUMMARY
Add pid tracking to async_wrapper, add terminate functionality to async_status
ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/async_status.py
ADDITIONAL INFORMATION