Hi Stavros,
Thanks for the reply, i came to a similar conclusion which i am working on
at the moment. I am deploying via a VMware customization spec and need to
wait for it to complete so i am going to use the powershell Listen-Port
module and fire that up on a RunOnce. Then ill use wait_for to detect the
open port....
If i dont get anywhere, ill give your process a shot.
Thanks!
Paul
On Thursday, 8 June 2017 19:22:37 UTC+1, Stavros wrote:
>
> Paul, I did resolve it by using the following workaround:
>
> First of all I searched for a Windows Service in the target host that was
> not used (it was in the manual status) and in case it would be started,
> then it should use a certain port for listening. With Ansible:
>
> - I scheduled a Windows job that was "looking for the condition to
> fulfill" on the target host. The job was running every couple of minutes.
> Once it was so far, the scheduled job was going to start a windows service,
> which was listening to a certain port. After the Windows service has
> started, the scheduled job had finally to delete "itself" from the
> scheduled jobs on the target host
> - I was using this port number of the Windows service in the wait_for
>
> My Ansible playbook had to reboot the target host anyway at the end. The
> Windows service I "misused" for the "wait_for" was not running after the
> reboot, so everything was "clean" again.
>
> Hope it helps,
> Stavros
>
>
> On Thursday, June 8, 2017 at 5:48:18 PM UTC+2, Paul Farrington wrote:
>>
>> Stavros, did you ever get this resolved as i have this exact issue now.
>>
>> On Wednesday, 10 February 2016 16:35:04 UTC, Stavros wrote:
>>>
>>> Hi,
>>>
>>> I use the wait_for in a playbook in order to wait until a file is
>>> present, but this doesn't work, e.g.
>>>
>>> - name: Wait for remote host
>>> wait_for: host={{ floating_ip }} path="C:\\Temp\\status.txt"
>>> state=present
>>>
>>> When I use the wait_for module for the winrm port, then it works fine:
>>>
>>> - name: Wait for remote host
>>> wait_for: host={{ floating_ip }} port=5986 state=started
>>>
>>>
>>> Any idea, how to wait in Windows for a file until it is present?
>>>
>>>
>>> Thanks in advance!
>>>
>>> KR,
>>> Stavros
>>>
>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e026ae9e-cf7e-470a-89ce-579fc60d9f31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.