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 ?