Hey. I've got this in my playbook:

  - name: Fire async to watch build
    shell: "CONTAINER=my_{{ timestamp }} /app/deploy/watch-docker.sh"
    async: 1200
    poll: 15
    register: watch_docker
    ignore_errors: true

  - name: Wait until built
    async_status:
      jid: "{{ watch_docker.ansible_job_id }}"
    register: job_result
    until: job_result.finished
    retries: 100
    delay: 15
    ignore_errors: true

and for some reason, after it passes the last action and goes onto the next 
ones, the script randomly stops working. No errors or anything, but the 
process just ends. It dies at different places, too, randomly on each host. 
The async poll usually takes about 7 minutes to run. I tried increasing the 
timeout on ansible.cfg to 30, but that did nothing either. 

For reference, here's the watch_docker.sh that gets called:

#!/bin/bash
if [ ! -z $CONTAINER ]; then
  while true; do
      docker exec $CONTAINER pgrep php5-fpm
      catch=$?
      if [ $catch -eq 0 ]; then
          break
      fi
      sleep 5
  done
fi
exit 0

I'm really at a loss as to what's going on. Any ideas? Thanks!

-- 
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/1a2ca68c-5166-467a-b23e-1df5403f78a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to