# Playbook vs Play

**URL:** <https://forum.ansible.com/t/playbook-vs-play/11668>\
**Category:** Ansible Project\
**Created:** [July 12, 2012, 5:26am UTC](https://forum.ansible.com/t/playbook-vs-play/11668 "2012-07-12T05:26:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpmens1](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jpmens1](https://forum.ansible.com/u/jpmens1)\
**Post date:** [July 12, 2012, 5:26am UTC](https://forum.ansible.com/t/playbook-vs-play/11668/1 "2012-07-12T05:26:32Z")

</div>

Is there a specific advantage to using more than one Play in a Playbook  
instead of multiple playbooks? Maybe I'm not understanding what a "Play"  
is.

Is this terminology correct?

"A playbook contains one or more plays, each consisting of one or more  
actions."

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-JP

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 12, 2012, 12:07pm UTC](https://forum.ansible.com/t/playbook-vs-play/11668/2 "2012-07-12T12:07:22Z")

</div>

> Is there a specific advantage to using more than one Play in a Playbook  
> instead of multiple playbooks? Maybe I'm not understanding what a "Play"  
> is.

If you have a deployment process that requires addressing multiple types of nodes in series, it would ensure  
you always execute them in that specific order. Otherwise, not really.

> Is this terminology correct?
> 
> "A playbook contains one or more plays, each consisting of one or more  
> actions."

Yes.

---

<div class="post-metadata">

**Author:** ![Lorin\_Hochstein1](https://avatars.discourse-cdn.com/v4/letter/l/ce73a5/32.png) [@Lorin\_Hochstein1](https://forum.ansible.com/u/Lorin_Hochstein1)\
**Post date:** [July 12, 2012, 12:24pm UTC](https://forum.ansible.com/t/playbook-vs-play/11668/3 "2012-07-12T12:24:44Z")

</div>

I use it in a playbook where the plays are conceptually related, but some plays need sudo and others don’t. For example, I have a deployment playbook with three plays:

1. With sudo: install prereq packages
2. As regular user: checkout code from repository
3. With sudo: restart services

Take care,

Lorin
