I am including some tasks like shown below in my main.yml (as one of the tasks in a list of several other tasks)
- name : remove swarm
include_tasks : swarm.undo.yml
tags : [ 'never', 'debug' ]
when I run the playbook specifying the --tags never It just don't run, but shows the output below.
PLAY [all] *****************************************************************************************************************************************************
TASK [Gathering Facts] *****************************************************************************************************************************************
ok: [node2]
ok: [node4]
ok: [node3]
ok: [node5]
ok: [node1]
ok: [node6]
TASK [swarm : remove swarm] ************************************************************************************************************************************
included: /home/xbox/Work/Infra/roles/swarm/tasks/swarm.undo.yml for node1, node2, node3, node4, node5, node6
PLAY RECAP *****************************************************************************************************************************************************
node1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
node2 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
node3 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
node4 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
node5 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
node6 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
If I do not specify and comment out the other tasks in that group (plus remove the never tag). It runs as it should.
Why is this behavior? What should I do to make it run correctly?