# Unable to start kibana from ansible playbook

**URL:** <https://forum.ansible.com/t/unable-to-start-kibana-from-ansible-playbook/36393>\
**Category:** Ansible Project\
**Created:** [March 3, 2022, 3:36am UTC](https://forum.ansible.com/t/unable-to-start-kibana-from-ansible-playbook/36393 "2022-03-03T03:36:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanjay\_Khatri](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Sanjay\_Khatri](https://forum.ansible.com/u/Sanjay_Khatri)\
**Post date:** [March 3, 2022, 3:36am UTC](https://forum.ansible.com/t/unable-to-start-kibana-from-ansible-playbook/36393/1 "2022-03-03T03:36:01Z")

</div>

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…!!!

---

<div class="post-metadata">

**Author:** ![dulhaver](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dulhaver/32/1061_2.png) [@dulhaver](https://forum.ansible.com/u/dulhaver)\
**Post date:** [March 3, 2022, 7:46pm UTC](https://forum.ansible.com/t/unable-to-start-kibana-from-ansible-playbook/36393/2 "2022-03-03T19:46:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dennis\_McCarthy1](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@Dennis\_McCarthy1](https://forum.ansible.com/u/Dennis_McCarthy1)\
**Post date:** [March 4, 2022, 5:05pm UTC](https://forum.ansible.com/t/unable-to-start-kibana-from-ansible-playbook/36393/3 "2022-03-04T17:05:21Z")

</div>

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](https://github.com/dmccuk/ansible_ELK/blob/master/roles/elk_config/tasks/kibana.yml)

---

<div class="post-metadata">

**Author:** ![Dhiraj\_Harshe](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@Dhiraj\_Harshe](https://forum.ansible.com/u/Dhiraj_Harshe)\
**Post date:** [March 4, 2022, 6:01pm UTC](https://forum.ansible.com/t/unable-to-start-kibana-from-ansible-playbook/36393/4 "2022-03-04T18:01:33Z")

</div>

Have you tried below command in playbook ?

```auto

tasks:

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

     register: ps_cmd

   - name: Show captured processes

      debug:

         var: ps_cmd.stdout

```

```auto

```

```auto

```

```auto
:

```

```auto

```

---

<div class="post-metadata">

**Author:** ![rolandm](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rolandm/32/755_2.png) [@rolandm](https://forum.ansible.com/u/rolandm)\
**Post date:** [March 7, 2022, 7:53am UTC](https://forum.ansible.com/t/unable-to-start-kibana-from-ansible-playbook/36393/5 "2022-03-07T07:53:07Z")

</div>

Hello,

> [https://github.com/dmccuk/ansible\_ELK/blob/master/roles/elk\_config/tasks/kibana.yml](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](https://gist.github.com/ricsiga/15654d3706e8eea9193b4bb9bd76a249)  
…  
[Service]

PIDFile=/var/run/kibana.pid

BR,  
Roland

---

<div class="post-metadata">

**Author:** ![rolandm](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rolandm/32/755_2.png) [@rolandm](https://forum.ansible.com/u/rolandm)\
**Post date:** [March 7, 2022, 7:55am UTC](https://forum.ansible.com/t/unable-to-start-kibana-from-ansible-playbook/36393/6 "2022-03-07T07:55:16Z")

</div>

Some editing error in my previous message:

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

[https://gist.github.com/ricsiga/15654d3706e8eea9193b4bb9bd76a249](https://gist.github.com/ricsiga/15654d3706e8eea9193b4bb9bd76a249)
