# include a playbook, but only run certain tags out of the playbook

**URL:** <https://forum.ansible.com/t/include-a-playbook-but-only-run-certain-tags-out-of-the-playbook/13370>\
**Category:** Ansible Project\
**Created:** [August 27, 2013, 3:17am UTC](https://forum.ansible.com/t/include-a-playbook-but-only-run-certain-tags-out-of-the-playbook/13370 "2013-08-27T03:17:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jesse\_Keating](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@Jesse\_Keating](https://forum.ansible.com/u/Jesse_Keating)\
**Post date:** [August 27, 2013, 3:17am UTC](https://forum.ansible.com/t/include-a-playbook-but-only-run-certain-tags-out-of-the-playbook/13370/1 "2013-08-27T03:17:20Z")

</div>

Is there a syntax for this? Do I have to pass --tags to the top level playbook that I want to run out of the included playbook?

-jlk

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [August 27, 2013, 12:42pm UTC](https://forum.ansible.com/t/include-a-playbook-but-only-run-certain-tags-out-of-the-playbook/13370/2 "2013-08-27T12:42:21Z")

</div>

Yes, you have to pass --tags.

---

<div class="post-metadata">

**Author:** ![kahlil.hodgson](https://avatars.discourse-cdn.com/v4/letter/k/b9bd4f/32.png) [@kahlil.hodgson](https://forum.ansible.com/u/kahlil.hodgson)\
**Post date:** [August 27, 2013, 9:33pm UTC](https://forum.ansible.com/t/include-a-playbook-but-only-run-certain-tags-out-of-the-playbook/13370/3 "2013-08-27T21:33:37Z")

</div>

I’ve occasionally wanted to do what Jesse suggested, both for includes and roles, and have considered suggesting it to the list.

My first thought was that this would be an elegant way of reusing roles, playbooks and task files.

My second thought was that that could result in a less elegant or clear ‘model of our systems’: that splitting up the roles/playbooks/tasks (and creating other playbooks to reassemble them) would expose key fragments of our configuration/orchestration that would be otherwise obscured.

Thoughts?

K

---

<div class="post-metadata">

**Author:** ![James\_Cammarata1](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@James\_Cammarata1](https://forum.ansible.com/u/James_Cammarata1)\
**Post date:** [August 27, 2013, 10:01pm UTC](https://forum.ansible.com/t/include-a-playbook-but-only-run-certain-tags-out-of-the-playbook/13370/4 "2013-08-27T22:01:51Z")

</div>

Kahlil, if you haven’t seem them already, about 2 weeks ago I added role dependencies, which allow you to add roles via a meta/main.yml file.

See here for more details:

[http://www.ansibleworks.com/docs/playbooks.html#role-dependencies](http://www.ansibleworks.com/docs/playbooks.html#role-dependencies)

This will be available in 1.3 (or now, if you’re using the devel branch straight from github).

---

<div class="post-metadata">

**Author:** ![kahlil.hodgson](https://avatars.discourse-cdn.com/v4/letter/k/b9bd4f/32.png) [@kahlil.hodgson](https://forum.ansible.com/u/kahlil.hodgson)\
**Post date:** [August 27, 2013, 10:09pm UTC](https://forum.ansible.com/t/include-a-playbook-but-only-run-certain-tags-out-of-the-playbook/13370/5 "2013-08-27T22:09:02Z")

</div>

Ah very cool. Thanks for the heads up! 🙂
