# tags for included tasks

**URL:** <https://forum.ansible.com/t/tags-for-included-tasks/12231>\
**Category:** Ansible Project\
**Created:** [January 22, 2013, 11:51am UTC](https://forum.ansible.com/t/tags-for-included-tasks/12231 "2013-01-22T11:51:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Nottingham](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@Mark\_Nottingham](https://forum.ansible.com/u/Mark_Nottingham)\
**Post date:** [January 22, 2013, 11:51am UTC](https://forum.ansible.com/t/tags-for-included-tasks/12231/1 "2013-01-22T11:51:56Z")

</div>

It would be great if an included task could be tagged, so that it isn’t necessary to tag everything in that task; e.g.,

- include: $tasks/sshd.yml

tags: sysconfig

Am I missing something?

Thanks,

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [January 22, 2013, 12:01pm UTC](https://forum.ansible.com/t/tags-for-included-tasks/12231/2 "2013-01-22T12:01:26Z")

</div>

Actually, that works.  
Just note the tag on the same line as the include:

- include: $tasks/sshd.yml tags=sysconfig

serge

---

<div class="post-metadata">

**Author:** ![Mark\_Nottingham](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@Mark\_Nottingham](https://forum.ansible.com/u/Mark_Nottingham)\
**Post date:** [January 22, 2013, 12:03pm UTC](https://forum.ansible.com/t/tags-for-included-tasks/12231/3 "2013-01-22T12:03:06Z")

</div>

Beautiful - thanks!

---

<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:** [January 22, 2013, 12:31pm UTC](https://forum.ansible.com/t/tags-for-included-tasks/12231/4 "2013-01-22T12:31:00Z")

</div>

I had thought we could also do it at the same level as well. For  
consistency we certainly should.

Send me a patch!
