What is a group_var or Group Variable in Ansible?

Question
You have heard of Group Variables in Ansible. What are they?

Answer
They are like global variables assigned in a modular way (like Ansible roles). They are ideal when you have Ansible playbooks that run against many different servers. Rather than have a regular variable in a playbook, group variables are taken from a group_vars/ directory. To read more about them, see this posting.

To use them, see this posting: How Do You Get Variables That Are Assigned a Value in an Ansible Playbook (i.e., a .yaml file) to Be Assigned from a Different File?

Leave a comment

Your email address will not be published. Required fields are marked *