Win_wait_for arbitrary results

Hi All,

We are evaluating options for a playbook with a very specific use case. We would like to monitor certain processes and / or services and depending on the state we would like Ansible to register the change and trigger another action.

We are using the following modules

• Wait for Process (Present / Absent)

• Wait for Service (Present / Absent)

https://docs.ansible.com/ansible/latest/modules/win_wait_for_module.html#win-wait-for-module

https://docs.ansible.com/ansible/latest/modules/win_wait_for_process_module.html#win-wait-for-process-module

The test have shown that the state check is working arbitrary. I have tried different Microsoft and third party processes / services.

The defined states (present and absent) seem to be ignored and Ansible continues the playbook.

We have two separate test labs and both seem prone to arbitrary results.

Is there something we are overlooking? (Similar like with the Windows session,Windows station winsta0 etc and psexec and the desktop lock only working in one very specific session configuration?)

Thank you

Lukas

Anyone?

You need to include more info, just saying it waits arbitrary isn’t enough for anyone to go by. Can you share some more info like;

  • The playbook/tasks you are using
  • Exactly what state the service is expected to be in and what you are waiting for
  • What do you man by arbitrary results? Is it sometimes timing out, failing, continuing when it shouldn’t?
    Waiting for processes or services shouldn’t be affected by the Windows station or desktop but it’s hard to tell without seeing more info.

Thanks

Jordan