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
--
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/1e3c136b-1934-4842-9b90-b1eba0166494%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.