the 'meta' tasks you see there might be the internal calls to `meta:
refresh_handlers` which don't normally have a name. List tasks in 2.0
shows these, they did not appear in previous versions.
Thanks Brian. I roughly binary searched and the behavior seems to have broken between Ansible code versions v1.9.4-1 and v2.0.0-0.1.alpha1.
Before, --list-tasks would show individual tasks and no ‘meta’ tasks. At 2.0, it just shows a shorter list of meta tasks, which breaks --start-at-task.
Brian, can you point me to the tests you’re running?
As an update to the previous, I gave up on binary searching to find where the behavior changed; the issue is present at v2.0.0-0.1.alpha1~250 but before then I see a compilation issue where Ansible thinks quotes are missing.
The task comes from an include, which seems to be the issue. Yes, roles are great and we try to use them as much as possible, but our codebase has a number of places where includes are used to define tasks lists.
Brian, please let me know what to do next. Thanks.
Files (common to both versions):
[19:50:41 Mon Nov 30] brandonh@brandonh-macbook.local ~/src/fwd/ops/ansible/fwd-ubuntu
My tests included a role and a bunch of debug tasks in 2 plays, all
worked, what did not have is a task include.
This is probably due to the new ‘dynamic’ nature of tasks includes in
2.0, the same reason those tasks don’t appear in task lists.
What do you think the correct behavior should be?
I feel like includes should get “unrolled” to enable --start-at-task. But, if you’d have to dynamically execute most of a playlist to even get to task names, I kinda see why this functionality might get forgotten.
Are you aware of any workarounds to enable debugging in the middle of a large playbook, outside of copious tags and/or commenting?
I think they should 'just work' TM, but this is not a simple one,
having dynamic includes makes this an 'interesting' problem, checking
with other devs trying to figure this out.
Did you have a chance to talk to other devs? Is this a conversation I could join in?
We’ve now switched internally to 2.0.0 but I’m finding a lot of debugging much slower, as I have to use a mix of tags and temporary commenting-out to get playbooks working.
Currently, this is the price we are paying for the dynamic 'task
includes', we are looking for ways around this issue but have not
found anything we are happy with yet.