include_vars
Collection: builtin
Full Name: parallax.builtin.include_vars
Aliases: ansible.builtin.include_vars, include_vars
Synopsis
Manage include vars
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| file | string | The file name from which variables should be loaded | ||
| dir | string | The directory name from which the variables should be loaded | ||
| name | string | The name of a variable into which assign the included vars | ||
| depth | int | 0 | When using dir, this module will, by default, recursively go through each sub directory and load up the variables | |
| files_matching | string | Limit the files that are loaded within any directory to this regular expression | ||
| ignore_files | list | List of file names to ignore | ||
| extensions | list | [json yaml yml] | List of file extensions to read when using dir | |
| ignore_unknown_extensions | bool | false | Ignore files with extensions that are not in the extensions list | |
| free_form | string | This module allows you to specify the ‘file’ option directly as a path |
Example
- name: Example include_vars task
include_vars:
file: <your_file>
dir: <your_dir>