DevOps Bootcamp · Lesson

Static Limits & the Inventory Plugin Model

Why fleets need dynamic sources.

Lesson 1 of 413 steps

Static Limits & the Inventory Plugin Model is a free DevOps Bootcamp lesson on CoddyKit. This is lesson 1 of 4. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, and your progress syncs across the web and the CoddyKit app. The DevOps Bootcamp course includes 4 lessons in total.

Static Files Go Stale

A static inventory is a hand-written list of hosts. The moment a server is created or destroyed in the cloud, that file is out of date.

Cloud Fleets Change Constantly

Auto-scaling groups add and remove instances by the minute. Keeping a static file in sync with a living fleet is a losing, error-prone battle. ☁️

Enter Dynamic Inventory

A dynamic inventory asks the live source of truth for hosts at runtime. Ansible queries your cloud, so the list is always current.

Two Ways: Scripts vs Plugins

Historically you used executable inventory scripts that printed JSON. The modern, supported way is an inventory plugin shipped in a collection.

What a Plugin Returns

An inventory plugin connects to a source, fetches hosts, and hands Ansible groups, hostnames, and variables, all built fresh on every run.

Configure with a YAML File

You enable a plugin by writing a small YAML config file. The key plugin names which plugin to load and parse the file.

plugin: amazon.aws.aws_ec2
regions:
  - us-east-1

The Magic Filename Suffix

For Ansible to auto-detect a plugin config, the file should end in .aws_ec2.yml or .yaml, matching the plugin name.

inventory.aws_ec2.yml

Enable Plugins in ansible.cfg

Inventory plugins must be enabled. List the ones you trust under enable_plugins in the inventory section of ansible.cfg.

[inventory]
enable_plugins = amazon.aws.aws_ec2

Pass It Like Any Inventory

Point Ansible at the plugin config with -i, exactly as you would a static file. Ansible sees the suffix and runs the plugin.

ansible-inventory -i inventory.aws_ec2.yml --graph

Inspect Before You Run

The ansible-inventory command renders the result so you can confirm which hosts and groups the plugin discovered before any play runs.

ansible-inventory -i inventory.aws_ec2.yml --list

Plugins Ship in Collections

Each cloud provider ships its inventory plugin inside a collection, like amazon.aws or google.cloud, installed from Ansible Galaxy.

Quick Check

Pick the modern dynamic inventory approach.

Recap

Static files rot as fleets change. Inventory plugins, enabled in ansible.cfg and configured by a YAML file, query live sources every run. ✅

Free to start

Learn DevOps Bootcamp with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
142
Lessons
568

Frequently Asked Questions

Is the “Static Limits & the Inventory Plugin Model” lesson free?

Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Static Limits & the Inventory Plugin Model”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The DevOps Bootcamp course includes 4 lessons in total.

What will I learn in “Static Limits & the Inventory Plugin Model”?

Why fleets need dynamic sources. You practise DevOps Bootcamp with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start DevOps Bootcamp?

No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 1 of 4.

How long does the “Static Limits & the Inventory Plugin Model” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this DevOps Bootcamp lesson?

Yes. Every DevOps Bootcamp lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Static Limits & the Inventory Plugin Model
  2. The aws_ec2 Inventory Plugin
  3. constructed: Group Hosts by Tags
  4. Caching & Multiple Inventory Sources
← Back to DevOps Bootcamp