Hmm wait_for is a python module. waiting for the port will work fine as that will presumably be happening on the ansible controller, rather than remotely on the machine you are trying to access.
If only waiting for a file will do then you could try using the fetch module to pull the file back you want to collect (fetch runs against windows hosts), then examine the file on the ansible controller. Would likely need to be wrapped in a block / rescue / always block - see http://docs.ansible.com/ansible/playbooks_blocks.html, and you might need to start off by waiting for a certain amount of time to avoid having to have multiple blocks to retry, but it might be enough to get you going. Hope this helps, Jon 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/1a0ae113-baf9-479a-ad4f-efe7f653c119%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
