I'm pretty sure you mean to ask "*DO* I need to run the same playbook with 
different variables for ports"? And it sounds like you've got a working 
play that acts on the port given to 'var'.
If that's it, then yes that is your easiest solution without changing your 
code. Call the play once with each value. Since it's an install play, that 
might be fine. But if it's also got for instance a start/stop play
then that not very elegant, or efficient, so you could instead run a 
with_items loop over 'var_list', where 'var_list' will be a list of ports 
to act on.

Good Luck! If you need more help, show us your code. :-)


On Thursday, June 27, 2019 at 4:16:05 PM UTC-4, Ajay Prajapati wrote:
>
> Hi,
> I have multiple applications to run on multiple tomcat on Sami server.. I 
> have playbook to install tomcat, I have to run the same playbook with 
> different variables for ports
> Like for example var=8080, var=8090, etc
>
> Hope my question is understandable,
> Quick help will be helpful
>
> Regards, Ajay
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ef7d286c-49a0-4145-a2f2-b6904724695a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to