Quiz Entry - updated: 2026.11.26
Why don't --list-tasks and --start-at-task work for tasks inside an included file?
Both look at the task list Ansible builds before the run. Imported tasks are in that list; included tasks are only read when the run reaches the include.
--list-tasksprints the tasks without running them. Tasks from animport_tasksfile appear one by one. For aninclude_tasksyou only see the include task itself, because its file hasn't been read.--start-at-task "<name>"starts the playbook at a given task. It can start at an imported task, but not at one inside an included file, since that name doesn't exist yet when Ansible looks for it.
Both options exist in ansible-playbook and in ansible-navigator run, and they behave the same in both. ansible-navigator is open source; Red Hat also ships it as part of its paid Ansible Automation Platform. The same applies to --list-tags: tags inside an include aren't listed.
Tip: if you need to see or jump to a task in a file, import that file.
Go deeper:
Comparing includes and imports (official docs) — the full table of differences: loops, handlers, --list-tasks, inventory variables.
Ansible Navigator documentation — the open-source text UI and CLI for running playbooks and execution environments.