As mention in @Zoredache post I would use group_vars in order to define a group to apply vars to all host.
In order to do that I would use a following inventory file :
[dev-servers] # inventory for dev servers dev1.example.com dev2.example.com [production-servers] # inventory for production servers prod1.example.com prod2.example.com [allvars:children] # group vars to apply for all hosts dev-servers production-servers [productionvars:children] # group vars to apply for only production production-servers [devvars:children] # group vars to apply for only dev dev-servers
Then you will have to create a dedicate group_vars file for allvars group, please find here an example of directory layout :
inventory_host # inventory file group_vars/ allvars.yml # here we assign variables to all hosts productionvars.yml # here we assign variables to only prod hosts devvars.yml # here we assign variables to only dev hosts