Alan Rominger

Author Archives: Alan Rominger

How to use the new Constructed Inventory Feature in Ansible Automation Platform 2.4

The New Constructed Inventory Feature

In this blog we introduced the idea for a new smarter way of handling inventory based on the Ansible constructed plugin. Now in Ansible Automation Platform 2.4, we have introduced this as a fully supported feature and this blog aims to introduce you to it! 

Constructed inventory is the successor to the existing Smart Inventory feature, and  is now presented as another choice when creating an Inventory in Ansible Automation Platform controller. This will take a list of ‘normal’ inventories as input, perform user-defined operations, filter, and produce a resultant inventory with content from the input inventories.

 

What is Constructed Inventory?

The function is similar to the existing smart inventory - in that it allows users to run jobs against hosts in multiple inventories. 

Constructed inventory however introduces new capabilities, including the built in ability to define and use both hostvars and groupvars:

  • Groups are present in constructed inventory and play a key role in its configuration.
  • User-defined logic (to add groups, vars, and down-select hosts) is run via ansible-inventory, which controller does for you, and is shown in the UI through an inventory update.
  • The format of user-defined logic Continue reading