Unable to start kibana from ansible playbook

Start command nohup ./bin/kibana > /dev/null 2>&1 &

After execute this command have to check kibana running mode

ps aux | grep node/bin/node

If i am running manually this command it is working fine but running from ansible playbook it is not working. Please help me.

Thanks in Advance…!!!

showing your TASK may be helpful in order to get some feedback

Hi,

For my ELK role I created a service each for elasticsearch, kibana and logstash. It just makes it easier to start and stop the ELK stack components and you can enable them at boot. You can see the role I created here with all the code:
https://github.com/dmccuk/ansible_ELK/blob/master/roles/elk_config/tasks/kibana.yml

Have you tried below command in playbook ?


tasks:

  - shell: ps aux | grep node/bin/node

     register: ps_cmd

   - name: Show captured processes

      debug:

         var: ps_cmd.stdout



:


Hello,

https://github.com/dmccuk/ansible_ELK/blob/master/roles/elk_config/tasks/kibana.yml

Start command nohup ./bin/kibana > /dev/null 2>&1 &

After execute this command have to check kibana running mode

ps aux | grep node/bin/node

If i am running manually this command it is working fine but running from ansible playbook it is not working. Please help me.

Thanks in Advance…!!!

your role uses systemd. Therefore, may be the best solution should be to have the check whether service is running in systemd service rather than in Ansible. On Ansible side then one would use only the service and systemd modules.

The following gist uses PIDFile definition by googling.

https://gist.github.com/ricsiga/15654d3706e8eea9193b4bb9bd76a249

[Service]

PIDFile=/var/run/kibana.pid

BR,
Roland

Some editing error in my previous message:

The following gist that I found by googling uses PIDFile definition .

https://gist.github.com/ricsiga/15654d3706e8eea9193b4bb9bd76a249