# I am new  in  ansible and want  to  create  a  playbook  that  stop  /start a full  platform

**URL:** <https://forum.ansible.com/t/i-am-new-in-ansible-and-want-to-create-a-playbook-that-stop-start-a-full-platform/23951>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [March 13, 2017, 12:55pm UTC](https://forum.ansible.com/t/i-am-new-in-ansible-and-want-to-create-a-playbook-that-stop-start-a-full-platform/23951 "2017-03-13T12:55:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonay\_Herrera\_y\_Stee](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@Jonay\_Herrera\_y\_Stee](https://forum.ansible.com/u/Jonay_Herrera_y_Stee)\
**Post date:** [March 13, 2017, 12:55pm UTC](https://forum.ansible.com/t/i-am-new-in-ansible-and-want-to-create-a-playbook-that-stop-start-a-full-platform/23951/1 "2017-03-13T12:55:31Z")

</div>

Hi,

I am new with ansible and will try to automate the whole stop/start procedure of a platform but I don’t know how to start:  
this is the sequence:

1. stop all client applications on appserver1,appserver2, appserver3, appserver4

2. stop the Linux servers (poweroff) appserver1, appserver2, appserver3, appserver4 on Vmware

3. stop apps on the master servers mainserver1, mainserver2

4. stop Linux ( poweroff) of the masterservers on Vmware  
and when the same to start the application platform, but I think that I need two playbooks to stop and to start the platform?

my Idea was something like this :

playbook:

- name: automatic STOP Application platform  
hosts: MDC  
sudo: True  
vars\_files:

# User defined variables for infrastructure

- infra-vars.yml

# Infrastructure passwords

#- secrets.yml  
roles:

- role: STOP\_APPSSERVERS
- role: STOP\_MAINSERVERS

but can I define different servers for the different roles on central inventory ?

because this need to be usable for a development environment, preproduction environment and production environment. and each environment has his own servers …

thanks to help me,

Jonay

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [March 14, 2017, 9:17am UTC](https://forum.ansible.com/t/i-am-new-in-ansible-and-want-to-create-a-playbook-that-stop-start-a-full-platform/23951/2 "2017-03-14T09:17:03Z")

</div>

You can have multiple plays inside one playbook. This lets you target different groups of servers - something like this:

`
