LOGBOOK

HELP

Quiz Entry - updated: 2026.11.26

What happened to the old ansible.builtin.include module, and why was it replaced?

include was used for both playbooks and task files, and switched between static and dynamic behavior depending on context, which confused users and caused bugs. Ansible 2.4 split it into include_tasks, import_tasks and import_playbook; it was later deprecated and removed in ansible-core 2.16.

The old module had a messy history:

  1. Before 2.0 it worked as a static import.
  2. In 2.0 it became dynamic, which broke some playbooks and brought new limits.
  3. In 2.1 it could be static or dynamic, depending on task options. Whether a given include was static wasn't visible from the code, and it didn't work reliably in every context.

Ansible 2.4 introduced separate keywords whose behavior is clear from the name: import_* is always static, include_* is always dynamic. include was deprecated in ansible-core 2.12 and removed in 2.16, so on current versions an old playbook that still uses it fails. Replace it with include_tasks or import_tasks, and with import_playbook at play level.

Go deeper:

From Quiz: ITIA / Ansible: Complex Playbooks with Imports and Includes | Updated: Nov 26, 2026