include_vars

Collection: builtin

Full Name: parallax.builtin.include_vars

Aliases: ansible.builtin.include_vars, include_vars

Synopsis

Manage include vars

Parameters

NameTypeRequiredDefaultDescription
filestringThe file name from which variables should be loaded
dirstringThe directory name from which the variables should be loaded
namestringThe name of a variable into which assign the included vars
depthint0When using dir, this module will, by default, recursively go through each sub directory and load up the variables
files_matchingstringLimit the files that are loaded within any directory to this regular expression
ignore_fileslistList of file names to ignore
extensionslist[json yaml yml]List of file extensions to read when using dir
ignore_unknown_extensionsboolfalseIgnore files with extensions that are not in the extensions list
free_formstringThis 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>