Ansible/Splitting Hosts File
From charlesreid1
Strategy: create separate variable file for each host and each group
These variable files should be in YAML format
If your playbooks are in playbooks/, and your hosts file is in playbooks/hosts, then you would organize the directory as follows:
- put variables for the host
california.example.cominto the file playbooks/host_vars/california.example.com - put variables for the production group in the file
playbooks/group_vars/production