What is a dynamic inventory?

IntermediateConceptInventory
Answer

An inventory generated at run time by querying an external source (a cloud API, CMDB, Kubernetes, vSphere) instead of a hand-edited file. In a cloud with autoscaling, a static file is wrong within hours, while a dynamic one reflects what exists now.

Today this is done with inventory plugins such as amazon.aws.aws_ec2, azure.azcollection.azure_rm, google.cloud.gcp_compute, or kubernetes.core.k8s. Older executable scripts that print JSON still work with --list and --host but are discouraged.

All Ansible questions Roadmap: Ansible

More on Inventory