Let the CMDB Drive the Inventory

Implement the dynamic inventory JSON contract against a live source of truth.

A advanced Ansible challenge worth 20 points. Solve it hands-on in a real Ansible environment in your browser - no local setup, no fake shells.

The Challenge

Scenario: The static inventory is gone; inventory/cmdb.json is now the source of truth. The provided inventory/dynamic.py is not executable and prints a flat list of names instead of the object contract Ansible expects.

Make --list emit real groups, a production children group and a populated _meta.hostvars, make --host answer with a JSON object, point ansible.cfg at the script, and have all four hosts write ~/etc/cmdb-proof.txt. Then run check.