# list-tasks function won't work with skip-tags

**URL:** <https://forum.ansible.com/t/list-tasks-function-wont-work-with-skip-tags/17634>\
**Category:** Ansible Project\
**Created:** [February 27, 2015, 11:22am UTC](https://forum.ansible.com/t/list-tasks-function-wont-work-with-skip-tags/17634 "2015-02-27T11:22:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![operations.v3d](https://avatars.discourse-cdn.com/v4/letter/o/35a633/32.png) [@operations.v3d](https://forum.ansible.com/u/operations.v3d)\
**Post date:** [February 27, 2015, 11:22am UTC](https://forum.ansible.com/t/list-tasks-function-wont-work-with-skip-tags/17634/1 "2015-02-27T11:22:45Z")

</div>

Hi all,

I am trying to know which tasks will be played with the **–list-tasks** option. I want also to specified tags to be skipped with **–skip-tags**.

The use of these two options produce strange behavior.  
To illustrate: I have on playbook ‘site.yml’ with 3 plays:

- play1: contain tag1 tasks and untag tasks
- play2: contain untag tasks
- play3: contain tag2 tasks

If I run:

`ansible-playbook -i inventoryFile site.yml --list-tasks -skip-tags "tag1,tag2"`

I don’t have any plays planned to be played.

If I run:

`ansible-playbook -i inventoryFile site.yml --list-tasks -skip-tags "tag1"`

I will only see tasks of the play1 wihout tag1. What about the play2 and play3 ?

If I run:

`ansible-playbook -i inventoryFile site.yml --list-tasks -skip-tags "tag2"`

I will only see tasks of the play3 wihout tag2. What about the play2 and play1 ?

Furthermore, if I run:

`ansible-playbook -i inventoryFile site.yml --list-tasks`

I will see all tasks and all plays, even if there is no host configured for the play

Am I missing something ?

---

<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 4, 2015, 2:51pm UTC](https://forum.ansible.com/t/list-tasks-function-wont-work-with-skip-tags/17634/2 "2015-03-04T14:51:49Z")

</div>

Can you try against the current development version?

tagging and list-tasks had several fixes go in.
