Ansible dynamic inventory
It is easy to manage your managed node information inside static inventory files when you have a smaller number of nodes or an almost fixed set of assets, such as bare-metal servers or virtual machines that are not frequently recreated. But, if your environment contains many dynamic nodes, such as virtual machines on multiple public or private cloud platforms, Kubernetes, or OpenShift platforms, then keeping your managed node information inside static files will be difficult, as you need to keep track of the changes and update your inventory files with them, including IP addresses, login credentials, and more. In such cases, you can use the dynamic inventory features in Ansible, which are basically some custom scripts and inventory plugins that collect inventory information from these virtualization or container platforms.
When you pass the dynamic inventories to Ansible, the inventory plugins will be executed and will collect the details of managed nodes...