community.windows.win_wait_for_process – Waits for a process to exist or not exist before continuing.¶
Note
This plugin is part of the community.windows collection (version 1.3.0).
To install it use: ansible-galaxy collection install community.windows
.
To use it in a playbook, specify: community.windows.win_wait_for_process
.
Synopsis¶
Waiting for a process to start or stop.
This is useful when Windows services behave poorly and do not enumerate external dependencies in their manifest.
Parameters¶
See Also¶
See also
- ansible.builtin.wait_for
The official documentation on the ansible.builtin.wait_for module.
- ansible.windows.win_wait_for
The official documentation on the ansible.windows.win_wait_for module.
Examples¶
- name: Wait 300 seconds for all Oracle VirtualBox processes to stop. (VBoxHeadless, VirtualBox, VBoxSVC)
community.windows.win_wait_for_process:
process_name_pattern: 'v(irtual)?box(headless|svc)?'
state: absent
timeout: 500
- name: Wait 300 seconds for 3 instances of cmd to start, waiting 5 seconds between each check
community.windows.win_wait_for_process:
process_name_exact: cmd
state: present
timeout: 500
sleep: 5
process_min_count: 3
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Charles Crossan (@crossan007)