Hi all,
I am running a command using the command module. This is how it is
- name: start
command: /opt/eate/bin/script.pl >/dev/null &
Now the problem is , after running the command, its not able to come out and i have to manually abort the playbook to come out of the execution.
How can i handle this so that after trigerring the command successfully , it exits properly ?
system
(system)
March 20, 2018, 1:23pm
2
use nohup to detach the tty.
In any case, it is not a good way to start backgrounded services, it
is much better to use the init system or some other service control
software on the target.
Sounds like you may want to use async “fire and forget” by specifying a poll value of 0.
http://docs.ansible.com/ansible/latest/playbooks_async.html