# launch / shutdown a whole application

**URL:** <https://forum.ansible.com/t/launch-shutdown-a-whole-application/16515>\
**Category:** Ansible Project\
**Created:** [October 15, 2014, 8:34am UTC](https://forum.ansible.com/t/launch-shutdown-a-whole-application/16515 "2014-10-15T08:34:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torsten\_Reinhard](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Torsten\_Reinhard](https://forum.ansible.com/u/Torsten_Reinhard)\
**Post date:** [October 15, 2014, 8:34am UTC](https://forum.ansible.com/t/launch-shutdown-a-whole-application/16515/1 "2014-10-15T08:34:41Z")

</div>

Hi,

we have a huge application consisting of several components (Apache, Tomcat, Weblogic, …Database)

To shutdown the system properly we want to follow a sequence starting at the “top” (Apache) down to the backend (Database)  
For launching the system we do the reverse order - starting at the database and the UI (or interfaces) will be the last components launched.

For each component we have separate deployment playbooks with tags “stop” and “start”.

Do i have to create 2 playbooks for the launch/shutdown than like?

shutdown.yml

- include “apache.yml”
- include “tomcat.yml”
- include “servers.yml”
- include “databaseyml”

and anotherone like

- include “databaseyml”
- include “servers.yml”
- include “tomcat.yml”
- include “apache.yml”

Or is there any option to have only one playbook where I can toggle the order of the included playbooks?

Thanx for any ideas,

Torsten

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 20, 2014, 9:18pm UTC](https://forum.ansible.com/t/launch-shutdown-a-whole-application/16515/2 "2014-10-20T21:18:32Z")

</div>

I would not use multipurpose roles with modes here, because including something that requires a parameter to be in shutdown or startup mode is probably weird.

I’d probably keep it simple and have a seperate role for “shutdown” or if you really thought it needed to be split up “shutdown\_foo” and “shutdown\_bar”, etc.

---

<div class="post-metadata">

**Author:** ![Torsten\_Reinhard](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Torsten\_Reinhard](https://forum.ansible.com/u/Torsten_Reinhard)\
**Post date:** [October 21, 2014, 3:53pm UTC](https://forum.ansible.com/t/launch-shutdown-a-whole-application/16515/3 "2014-10-21T15:53:10Z")

</div>

Ok,

I agree with you.  
Its than shutdown.yml and startup.yml playbooks with same includes but different order.

Regards, Torsten
