You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation.
The name of the imported file is specified directly without any other option.
Most keywords, including loops and conditionals, only applied to the imported tasks, not to this statement itself. If you need any of those to apply, use include_tasks instead.
-hosts:alltasks:-debug:msg:task1-name:Include task list in playimport_tasks:stuff.yaml-debug:msg:task10hosts:alltasks:-debug:msg:task1-name:Apply conditional to all imported tasksimport_tasks:stuff.yamlwhen:hostvar is defined
For more information about Red Hat’s this support of this module, please
refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>