/bin/bash output in ansible playbook as a conditional statement

Dear All,

Is it possible to get the output from .sh file and compare with “Apache Tomcat/9.0.26” and if condition is true proceed for next step ?

Dear All,

Is it possible to get the output from .sh file and compare with "Apache Tomcat/9.0.26" and if condition is true proceed
for next step ?

The condition in "when" is evaluated before running the task. You need an additional task where you can apply the
condition based on the values in output.stdout.

Regards
          Racke

Thanks Racke !!

Let me try it .