From the course: Ansible Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Creating dynamic inventory files

Creating dynamic inventory files - Ansible Tutorial

From the course: Ansible Essential Training

Creating dynamic inventory files

- [Instructor] Inventory files are great, but they do lack in one major area. They are static. What if we have a cloud infrastructure as a service environment that we want to run Ansible against? This inventory, by the very nature of rapid elasticity in the cloud, might be changing all the time. The answer to this problem, of course, is dynamic inventory files Thanks to APIs, we can have the cloud provider produce a dynamic inventory for us. We can then use this inventory file like we do our static files. Let me demonstrate this using AWS as an example. This is very easy to do now, thanks to an AWS inventory plugin that we can call upon for EC2, the virtual machine service of AWS. Now, keep in mind, I'm doing an AWS example here, but you could be following the instructions for whatever cloud provider that you're working with. You are not going to be surprised to discover that there's dynamic inventory processes now for…

Contents