check if the release is already deployed and tomcat is running, if true then skip the roles

say my the release is under /home/app/10.1.1222/…

how to implement this in ansible playbook: check if the release is already deployed and tomcat is running, if true then skip the roles