shell - Daemonizing an executable in ansible -


i trying create task in ansible executes shell command run executable in daemon mode using &. following

-name: start daemon   shell: myexeprogram arg1 arg2 & 

what seeing if keep & task returns , process not started . if remove & ansible task waits quite time without returning.

appreciate suggestion on proper way start program in daemon mode through ansible. pls note dont want run service adhoc background process based on conditions.

running program '&' not make program daemon, runs in background. make "true daemon" program should steps described here.

if program written in c, can call daemon() function, you. can start program without '&' @ end , running daemon.

the other option call program using daemon, should job well.

- name: start daemon   shell: daemon -- myexeprogram arg1 arg2 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -