# Idea: --list-tasks show task's tags

**URL:** <https://forum.ansible.com/t/idea-list-tasks-show-tasks-tags/17579>\
**Category:** Ansible Developer\
**Tags:** galaxy-ng\
**Created:** [February 20, 2015, 6:00pm UTC](https://forum.ansible.com/t/idea-list-tasks-show-tasks-tags/17579 "2015-02-20T18:00:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leonel\_Galan\_Recinos](https://avatars.discourse-cdn.com/v4/letter/l/d2c977/32.png) [@Leonel\_Galan\_Recinos](https://forum.ansible.com/u/Leonel_Galan_Recinos)\
**Post date:** [February 20, 2015, 6:00pm UTC](https://forum.ansible.com/t/idea-list-tasks-show-tasks-tags/17579/1 "2015-02-20T18:00:16Z")

</div>

Re post from [ansible-project](https://groups.google.com/forum/#!topic/ansible-project/edmbZofB67I)

I’ve been learning Ansible in the last couple of months and when using roles from Ansible Galaxy, it’s hard to know which tags each tasks has. I’ve search and couldn’t find a way to show all tags a task has, when listing all tasks (–list-tasks). I can build from source and do a small change on [https://github.com/ansible/ansible/blob/v1.8.4/bin/ansible-playbook#L251](https://github.com/ansible/ansible/blob/v1.8.4/bin/ansible-playbook#L251) from:

`print ' %s' % task.name`

to:

`print ' %s - %s' % ( [task.name](http://task.name/), stringc(', '.join(task.tags), 'blue') )`

And it works great:

`Update caches - all Create general configuration file for APT - all Install apt packages - all Install packages - all Update parameters - all Creating groups - all, configuration, groups, users Per-user group creation - all, configuration, users ...`

Except:

- I don’t know what’s the base interface for adding this: Modify existing --list-tasks, add a second flag: --list-tasks-with-tags, or …

- I wanted to get a feel if this would be considered useful by others.  
Thanks for taking the time to read my post, I’m willing to submit a PR with your suggestions.

---

<div class="post-metadata">

**Author:** ![Leonel\_Galan\_Recinos](https://avatars.discourse-cdn.com/v4/letter/l/d2c977/32.png) [@Leonel\_Galan\_Recinos](https://forum.ansible.com/u/Leonel_Galan_Recinos)\
**Post date:** [March 11, 2015, 6:06pm UTC](https://forum.ansible.com/t/idea-list-tasks-show-tasks-tags/17579/2 "2015-03-11T18:06:03Z")

</div>

Disregard, this was better implemented and merged already by in Brian Coca in [https://github.com/ansible/ansible/pull/10414](https://github.com/ansible/ansible/pull/10414)

---

<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:** [March 11, 2015, 6:24pm UTC](https://forum.ansible.com/t/idea-list-tasks-show-tasks-tags/17579/3 "2015-03-11T18:24:58Z")

</div>

Sorry, I had missed this post, I actually added that after someone  
mentioned it on twitter, since I had just modified a lot of the tag  
code. I might have done it earlier if I had seen your post :-).
