# check jboss process

**URL:** <https://forum.ansible.com/t/check-jboss-process/19780>\
**Category:** Ansible Project\
**Created:** [November 17, 2015, 5:13am UTC](https://forum.ansible.com/t/check-jboss-process/19780 "2015-11-17T05:13:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skr989](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@skr989](https://forum.ansible.com/u/skr989)\
**Post date:** [November 17, 2015, 5:13am UTC](https://forum.ansible.com/t/check-jboss-process/19780/1 "2015-11-17T05:13:49Z")

</div>

I have the below play to identify if JBoss java process is up. I am expecting the msg not to be printed (skipped) if JBoss is down. Am I doing anything wrong here?

tasks:

- name: Check JBoss java process  
shell: ps -ef | grep java | grep “jboss.server”  
register: jboss\_java\_process  
ignore\_errors: false

- debug: msg=“JBoss Process is running on {{ inventory\_hostname }}”  
when: jboss\_java\_process.stdout.find(“jboss.server”) != -1

-SKR

---

<div class="post-metadata">

**Author:** ![Markus\_Ellers](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@Markus\_Ellers](https://forum.ansible.com/u/Markus_Ellers)\
**Post date:** [November 21, 2015, 5:51pm UTC](https://forum.ansible.com/t/check-jboss-process/19780/2 "2015-11-21T17:51:04Z")

</div>

Hi,  
can you run it with -vv and post the output?
