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.
Written by Lorin Hochstein
Related protips
2 Responses

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
·

Thanks, @reiz, link has been fixed.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ansible
Authors

tartansandal
73.35K
Related Tags
#ansible
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#