ansible.builtin.include_vars – Load variables from files ...
docs.ansible.com › ansible › latestUsing free-form to specify the file. include_vars: " {{lookup ('first_found', params)}} " vars: params: files:-' {{ansible_distribution}}.yaml'-' {{ansible_os_family}}.yaml'-default.yaml paths:-'vars'-name: Bare include (free-form) include_vars: myvars.yaml-name: Include all .json and .jsn files in vars/all and all nested directories (2.3) include_vars: dir: vars/all extensions:-'json'-'jsn'-name: Include all default extension files in vars/all and all nested directories and save the output ...
Using Variables — Ansible Documentation
docs.ansible.com › playbooks_variablesFor example, you can define the user Ansible uses to connect to remote devices as a variable with ansible_user, in a configuration file with DEFAULT_REMOTE_USER, as a command-line option with -u, and with the playbook keyword remote_user. If you define the same parameter in a variable and by another method, the variable overrides the other setting.