I am installing several Tomcats on the same server which requires several 
different tasks.  To do this I am using *with_items: "{{ TomCats }}"* for 
each task where TomCats is something like the below and contained in a 
vars_files.  I have an Ansible role that I use for this which my playbook 
calls.  This all works great.

However, what I'd like to do is to be able to complete the install for a 
single Tomcat by running all the tasks for thatTomcat install and them move 
on to the next; similar to a loop.  Currently I run a single tasks for all 
Tomcats before moving to the next task in the role.

For example say I have 5 tasks that I need to complete the install of an 
individual Tomcat instance.  I'd like to run all 5 of the tasks to complete 
the install of dev-admin.aws.emory.edu, then dev-alumni.aws.emory.edu, then 
dev-apply.candler.aws.emory.edu, etc.

Is this possible?

*(my vars file)*
MetaSpaceDefault: 768
PermGenDefault: 768
MaxThreads: 200

TomCats:
- {site: 'dev-admin.aws.emory.edu', siteShortName: 'dev-admin', sdPort: 
'8001', httpPort: '9501', ajpPort: '9001', address: '127.0.0.1', metaSpace: 
"{{ MetaSpaceDefault }}", permGen: "{{ PermGenDefault }}" ,maxThreads: "{{ 
MaxThreads }}"}
- {site: 'dev-alumni.aws.emory.edu', siteShortName: 'dev-alumni', sdPort: 
'8002', httpPort: '9502', ajpPort: '9002', address: '127.0.0.1', metaSpace: 
"{{ MetaSpaceDefault }}", permGen: "{{ PermGenDefault }}" ,maxThreads: "{{ 
MaxThreads }}"}
- {site: 'dev-apply.candler.aws.emory.edu', siteShortName: 
'dev-apply.candler', sdPort: '8004', httpPort: '9504', ajpPort: '9004', 
address: '127.0.0.1', metaSpace: "{{ MetaSpaceDefault }}", permGen: "{{ 
PermGenDefault }}" ,maxThreads: "{{ MaxThreads }}"}
- {site: 'dev-apps.sph.aws.emory.edu', siteShortName: 'dev-apps.sph', 
sdPort: '8005', httpPort: '9505', ajpPort: '9005', address: '127.0.0.1', 
metaSpace: "2048", permGen: "2048", maxThreads: "{{ MaxThreads }}" }
- {site: 'dev-atlas.college.aws.emory.edu', siteShortName: 
'dev-atlas.college', sdPort: '8006', httpPort: '9506', ajpPort: '9006', 
address: '127.0.0.1', metaSpace: "{{ MetaSpaceDefault }}", permGen: "{{ 
PermGenDefault }}" ,maxThreads: "{{ MaxThreads }}"}
- {site: 'dev-biology.aws.emory.edu', siteShortName: 'dev-bio', sdPort: 
'8007', httpPort: '9507', ajpPort: '9007', address: '127.0.0.1', metaSpace: 
"{{ MetaSpaceDefault }}", permGen: "{{ PermGenDefault }}" ,maxThreads: "{{ 
MaxThreads }}"}
- {site: 'dev-biomed.aws.emory.edu', siteShortName: 'dev-bio', sdPort: 
'8008', httpPort: '9508', ajpPort: '9008', address: '127.0.0.1', metaSpace: 
"{{ MetaSpaceDefault }}", permGen: "{{ PermGenDefault }}" ,maxThreads: "{{ 
MaxThreads }}"}
- {site: 'dev-bmi.aws.emory.edu', siteShortName: 'dev-bmi', sdPort: '8009', 
httpPort: '9509', ajpPort: '9009', address: '127.0.0.1', metaSpace: "{{ 
MetaSpaceDefault }}", permGen: "{{ PermGenDefault }}" ,maxThreads: "{{ 
MaxThreads }}"}
- {site: 'dev-directory.service.aws.emory.edu', siteShortName: 
'dev-directory.service', sdPort: '8019', httpPort: '9519', ajpPort: '9019', 
address: '127.0.0.1', metaSpace: "{{ MetaSpaceDefault }}", permGen: "{{ 
PermGenDefault }}" ,maxThreads: "{{ MaxThreads }}"}
- {site: 'dev-it.aws.emory.edu', siteShortName: 'dev-it', sdPort: '8030', 
httpPort: '9530', ajpPort: '9030', address: '127.0.0.1', metaSpace: "2048", 
permGen: "2048", maxThreads: "{{ MaxThreads }}" }
- {site: 'dev-med.aws.emory.edu', siteShortName: 'dev-med', sdPort: '8034', 
httpPort: '9534', ajpPort: '9034', address: '127.0.0.1', metaSpace: "2048", 
permGen: "2048", maxThreads: "{{ MaxThreads }}" }
- {site: 'dev-advtest.aws.emory.edu', siteShortName: 'dev-advtest', sdPort: 
'8063', httpPort: '9563', ajpPort: '9063', address: '127.0.0.1', metaSpace: 
"{{ MetaSpaceDefault }}", permGen: "{{ PermGenDefault }}" ,maxThreads: "{{ 
MaxThreads }}"}
- {site: 'dev-cftest.aws.emory.edu', siteShortName: 'dev-cftest', sdPort: 
'8064', httpPort: '9564', ajpPort: '9064', address: '127.0.0.1', metaSpace: 
"{{ MetaSpaceDefault }}", permGen: "{{ PermGenDefault }}" ,maxThreads: "{{ 
MaxThreads }}"}

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8e1187f6-9cd5-40d1-b60a-fe3aab04a8ebn%40googlegroups.com.

Reply via email to