Ansible 1.7 shell module doesnt wait on jobs in the background

Hi,

I’m using Ansible to install Oracle and its been working great on 1.6. When I hit release 1.7 some things using the shell module started behaving differently.

The problem is this:

The oracle installer (runInstaller) is a shellscript that kicks off a java process (and puts the java process in the background) which then does the actual installation. Up until 1.7, Ansible waited for the job in the background to come back before moving on to the next task, but in 1.7 it just waits for the ‘kickoff’ script to come back and then moves on → the play fails.

Now, I’m not sure if the old 1.6 behaviour is the way it should be or not, but I certainly hope so.

I’ve got a small test-case which mimics the behaviour I’m seeing exactly. (2 shell-scripts and a playbook). Gist is here

kickoff.sh ← Starts another script (sleep.sh) and puts that in the background
sleep.sh ← Does a few echo’s with a sleep inbetween

`
cat /tmp/kickoff.sh
#!/bin/bash

echo “Kicking off other script at date
sh /tmp/sleep.sh 30 &

echo “All finished. Returned from other script at date

`

`
cat /tmp/sleep.sh
#!/bin/bash

echo “Starting $0 at date
echo “Sleeping $1 seconds”
sleep $1

echo “$0 Woke up”
echo “Sleeping another $1 seconds”
sleep $1

echo “$0 Done. Exiting $0 at date

`

The playbook (background.yml):

`

Just a note that I replied to another instance of this thread.