Wait for output of command

Hi,

I have a command that I need to wait for a completed output from which may take an hour how can I tell ansible to wait (ideally with a timeout so that if it does not get a completed status within the hour then it errors).

The command is as follows:
ec2-describe-conversion-tasks --region us-east-1

you can run the command many times, one of the fields gives a status so once the field changes to completed then the job is ok and can continue.

Thanks

Mark

Looks like you want to use a do-until-loop:

http://docs.ansible.com/playbooks_loops.html#do-until-loops

  • James