PARALLAX

include_tasks

Dynamically include a task file at run time

Collection: builtin

Full Name: parallax.builtin.include_tasks

Aliases: ansible.builtin.include_tasks, include_tasks

Synopsis

Dynamically include a task file at run time

Parameters

NameTypeRequiredDefaultDescription
free_formstringyesThe name of the imported file is specified directly without any other option
filestringThe name of the imported file
applymapAccepts a hash of task keywords (e.g. tags, become) that will be applied to the tasks within the include

Example

yaml
- name: Include the per-platform tasks
  include_tasks:
    file: "tasks/{{ ansible_os_family }}.yml"
Search
    ↑ ↓ move↵ openesc close