Multiple tomcat service on same server with ports

16 views
Skip to first unread message

Ajay Prajapati

unread,
Jun 27, 2019, 4:16:05 PM6/27/19
to Ansible Project
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

Dick Visser

unread,
Jun 27, 2019, 6:01:04 PM6/27/19
to ansible...@googlegroups.com
On Thu, 27 Jun 2019 at 22:16, Ajay Prajapati <ajay....@gmail.com> 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,

No, because you didn't ask any.
So, what is your question?
Please be very specific, and show playbooks, variables, etc.


thx

--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

David McCheyne

unread,
Jun 28, 2019, 12:25:33 AM6/28/19
to Ansible Project
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. :-)
Reply all
Reply to author
Forward
0 new messages