Skip to content

Commit

Permalink
Add an example for cleaning up the async job cache, and clarify how t…
Browse files Browse the repository at this point in the history
…hat works (ansible#81697)
  • Loading branch information
s-hertel authored Sep 14, 2023
1 parent 6f65397 commit 81c83c6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ansible/modules/async_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
mode:
description:
- If V(status), obtain the status.
- If V(cleanup), clean up the async job cache (by default in C(~/.ansible_async/)) for the specified job O(jid).
- If V(cleanup), clean up the async job cache (by default in C(~/.ansible_async/)) for the specified job O(jid), without waiting for it to finish.
type: str
choices: [ cleanup, status ]
default: status
Expand Down Expand Up @@ -70,6 +70,11 @@
until: job_result.finished
retries: 100
delay: 10
- name: Clean up async file
ansible.builtin.async_status:
jid: '{{ yum_sleeper.ansible_job_id }}'
mode: cleanup
'''

RETURN = r'''
Expand Down

0 comments on commit 81c83c6

Please sign in to comment.