manoj manoj - 1 year ago 195
Bash Question

how to run a kafka broker start script in background using ansible

How to run a Kafka broker start script written in ansible in background
when I am running it normally it is executing on the foreground and I'm unable to get back the control of terminal, if I close the terminal or Ctrl+c them Kafka broker will be stopped

My goal is after starting Kafka broker on the CLI, I need to run few more commands on that terminal to do some other tasks

ansible kafkabrokers -a "~/kafka_2.11- ~/kafka_2.11- "

nohup and '&' are notworking

Answer Source

well I searched and found an answer for this is to use -daemon

ansible kafkabrokers -a  " ~/kafka_2.11- -daemon ~/kafka_2.11- "
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download