v5q8zq
Last Updated: February 25, 2016
·
7.767K
· lorin
Me pixel

Defining global variables

Ansible allows you to define variables on a per-host and per-group basis.

Because ansible has the special all group that all hosts are automatically a part of, you can create an <INVENTORY_FILE_LOCATION>/group_vars/all file and populate it with variables. These variables will be accessible in all of your plays.

This saves you the trouble of explicitly defining a vars_files entry to include the global variable file in all of your plays.

Say Thanks
Respond

2 Responses
Add your response

15622
1a89cdb2ef156ffc8c9c6a49d98cd1a2

Thanks man. That was the right hint for me.

By the way. The link in the first line doesn't work anymore.

over 1 year ago ·
15623
Me pixel

Thanks, @reiz, link has been fixed.

over 1 year ago ·
Filed Under