I have the below play to check if JBoss application server is RUNNING. I am
getting the message "JBoss Process is running on localhost"
(inventory_hostname = localhost) even when 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
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/d5b6df54-73cd-4669-8684-0fe9c6c60d82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.