# Run only those tasks tagged as both X and Y?

**URL:** <https://forum.ansible.com/t/run-only-those-tasks-tagged-as-both-x-and-y/17994>\
**Category:** Ansible Developer\
**Created:** [April 16, 2015, 12:52pm UTC](https://forum.ansible.com/t/run-only-those-tasks-tagged-as-both-x-and-y/17994 "2015-04-16T12:52:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Overmyer](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@Ben\_Overmyer](https://forum.ansible.com/u/Ben_Overmyer)\
**Post date:** [April 16, 2015, 12:52pm UTC](https://forum.ansible.com/t/run-only-those-tasks-tagged-as-both-x-and-y/17994/1 "2015-04-16T12:52:46Z")

</div>

Is there a way in an ansible-playbook run to only run those tasks that have all of the specified tags?

E.g., ansible-playbook myplaybook.yml --tags nginx AND config would only run tasks that have both nginx and config tags.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [April 16, 2015, 1:28pm UTC](https://forum.ansible.com/t/run-only-those-tasks-tagged-as-both-x-and-y/17994/2 "2015-04-16T13:28:31Z")

</div>

no, not currently, there is a request to allow for tags expressions  
that mirror host expressions but nothing has been done yet.
