check jboss process

33 views
Skip to first unread message

skr...@gmail.com

unread,
Nov 17, 2015, 12:13:49 AM11/17/15
to Ansible Project
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

Markus Ellers

unread,
Nov 21, 2015, 12:51:04 PM11/21/15
to Ansible Project
Hi,
can you run it with -vv and post the output?
Reply all
Reply to author
Forward
0 new messages