I am working on an ansible playbook, which runs a shell script in async ( poll = 0 ) mode.
This shell script, which runs on remote host #1, calls a python program on remote host #2, which runs for a long duration.
So the flow is something like: ansible ----> shell script on remote host #1 ----> python script on remote host #2 ( could run for a long duration )
After the python script is done executing, it writes data into files, and those file are to be copied into the #1 host from #2 using the same shell script triggered on #1 host, using "wait" command in shell script.
The #1 host shell script executes thoroughly when run from the terminal manually, and the files are copied.
But when I try this using async, and provide and async: 100 seconds time, the shell script on #1 host runs only for 100 seconds, and the shell script stops, while the python script could run for more than that duration.
Is this behavior expected? Is there a way to "fire and forget" the shell script, so that it runs for more than the async duration?