Hey. I’m having an issue in Ansible 1.9.4 where a playbook just stops running. No errors or anything, the process just dies. It seems to happen at random places when running the playbook, but it all seems to happen after these two steps:
-
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
Is it possible that after the async shell call, the process dies on the next poll? Turning on verbose didn’t seem to help. I also tried raising the timeout to 30 in ansible.cfg, but that also did nothing. If I take out these two actions and replace them with a pause action, the playbook completes. Any ideas? I’m pretty stuck on this one…
For reference, here’s the watch-docker script:
// watch-docker.sh
#!/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