writing playbook with vars and input parameters

Hi Experts,

Am a beginner to ansible and need all your guidance to learn and understand ansible at its all functionality and professional way of playbook creation.

So Experts, here i am installing an application and i have application built in silent script for execute them and can install successfully. I am much aware in application side to execute this commands where i have to add some arguments and input parameters file provide credential etc…

So here is the sample playbook which i created for the same . here I am using command module to run my installer as i am executing on the terminal.

But here I want to make more sensible playbook for this,as some requirements as below.

  1. Before installing check whether the software is already present or the directory is already existing or not.

  2. define the location of the packages, paramters and credetial details in more proffessional and logical way(using vars and directory path command etc…)

It would be great if you could help me with a sample example for my below playbook so that i can learn and apply them in my other playbooks…

Hi Experts,

Any assistance here. ?