Async tasks running Bash scripts with background jobs

17 views
Skip to first unread message

Tomasz Kuchta

unread,
Jan 5, 2016, 6:51:33 AM1/5/16
to Ansible Project
Hi All,
I have an async command that is invoking a Bash script.
The script invokes some other scripts in background (using "&").
I have noticed that the background command is either not called or it terminates immediately (not sure).
The same script works in non-asynchronous mode (using the shell module) - the background jobs are controlled,
so I would terminate them before the script finishes.
It seems to me that this might have something to do with the fact that async tasks are run differently.
Is is an expected behaviour or I should be able to run background tasks like this?

Thanks! 

Tomasz Kuchta

unread,
Jan 5, 2016, 1:44:29 PM1/5/16
to Ansible Project
My bad - the background job is actually running - I just needed to use absolute paths.
Sorry for confusion.
Reply all
Reply to author
Forward
0 new messages