Say I want to run a script in the background after my Ansible run finishes. 
Which of these two options is the correct way?

*Option 1: Run a nohup on the Ansible task itself*
- name:Run a script in the background
  command: nohup myscript.sh 2>&1  &

where myscript.sh does something (anything) but has no nohup calls.


*Option 2: Put the nohup in the script itself?*
- name: Run a script in the background
  command: ./myscript.sh

and myscript.sh has in it the nohup

*myscript.sh*
nodup do_something 2>&1 &




-- 
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/70316e05-1357-40d8-aab4-53092dd8edc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to