My first Ansible project is configuring the DNS client of our Linux machines. This configuration is different depending on the managed node's location within our network (west dmz, west non-dmz, east dmz, east non-dmz). I'm trying to figure out how to scope my playbook so that each location has its own configuration applied. We don't have Ansible Tower and I'm not sure if we are getting it. I am confident that I can create the logic to determine the location based on the managed node's default gateway. Our environment is approaching 2000+ systems. So, I'm wondering:
1) I'm assuming (hoping) that there is a way to do this in a single playbook using some kind of conditional like "switch/caseof server_location". How do I do this?
2) It is possible that this configuration information is stored in a text file external to the playbook?
3) The thought of creating and managing inventory files for all of this seems rather daunting. Is there a better way to create & manage an inventory of this size assuming that our organization is not willing to pay for Ansible Tower? Would this be dynamic inventory via some kind of vSphere/vCenter plugin?
Thanks.