Ansible: Including Variables
Jump to navigation Jump to search
Including variables in Ansible can be achieved in several ways.
- Referenced via relative path to the called playbook
- Referenced in via absolute directories
- Included variables persist over the entire playbook execution and is accessible in included tasks.
--- - hosts: myhosts vars_files: - default_step.yml
- Include into tasks
tasks: - name: include default step variables include_vars: default_step.yml