Ansible Include vs Import
“In Ansible 2.4, the include
module is deprecated. In its place, it ships with two replacement modules, import_tasks
and include_tasks
. But they have very similar descriptions:\r\n\r\n- include_tasks
: Includes a file with a list of tasks to be executed in the current playbook.\r\n- import_tasks
: Imports a list of tasks to be added to the current playbook for subsequent execution.\r\n\r\nWhen should I use the former, and when should I use the latter?”
<a href=““https://serverfault.com/questions/875247/whats-the-difference-between-include-tasks-and-import-tasks"">— “Ben S”