Loops Over Dictionaries and Honest Conditionals

Fix a dict looped as a list and a condition that is false on every host.

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

The Challenge

Scenario: The service catalogue is a dictionary but the play loops it like a list, so item.enabled fails. A second guard reads when: inventory_hostname in dbservers - a group name, not a variable - so it is silently false everywhere.

Every production host must get ~/srv/services/api/port (8001) and worker/port (8002), no debug directory at all, and only dbservers may get ~/srv/db-tools.marker. Then run check.