Mastering Ansible Season 1 Episode 17 Dynamic Inventories
- January 30, 2018
- 22 min
Mastering Ansible is a technology-focused television show aimed at software developers, computer engineers and DevOps professionals. The show follows the leader of a team of computer engineers who use Ansible to automate complex IT tasks.
Season 1, episode 17 of the show is titled "Dynamic Inventories." This episode explores the use of dynamic inventories in Ansible automation. A dynamic inventory is a way of defining hosts and groups for Ansible using external or non-static data sources. This is in contrast to traditional inventories, which use a static file to define host information.
The episode begins with an overview of the limitations of static inventories in complex system setups. The team quickly realizes that in dynamic setups, the number and IP addresses of hosts can change frequently, making it difficult to manage inventories with static files. This is where dynamic inventories come in. The team discusses the need for an external data source and how dynamic inventories can be leveraged to enable Ansible to access external information.
The team then moves on to a practical demonstration of setting up a dynamic inventory. Firstly, they outline the configuration of a dynamic inventory plugin to pull in inventory from external data sources like an API or a database. They then dive into the details of accessing and authenticating with various external systems, such as OpenStack, AWS, and Azure.
Next, the team demonstrates how to build a custom dynamic inventory script to pull in host information from a proprietary application. They first outline the requirements for the source file to ensure that it works with Ansible. The team then goes through the development of a custom dynamic inventory script step by step.
The episode then shifts into the topic of host grouping, explaining that dynamic inventories provide the ability to push dynamic changes into a group without an update to the static host file. They explain that dynamic inventory plugins can define the properties of the host, including SNMP values, network interface configurations, and more, enabling users to create any grouping they can confederate.
Towards the conclusion of the episode, the team outlines the security and access control features around dynamic inventories. They explain how security models can differ based on the external system being used and how to manage different environments. They also explain how dynamic inventory plugins can apply endpoint-level access controls to enhance security in production environments.
Overall, "Dynamic Inventories" is an educational and engaging episode, ideal for Ansible users looking to enhance their automation skills. This episode delivers an in-depth look at the advantages of dynamic inventories and how they can be leveraged to automate IT tasks. The show's format is fast-paced, with expert presenters who explain the concepts of dynamic inventories and customization of Ansible in a clear and concise manner.