Interview Prep/Ansible/Project Structure and Design

What is a sensible tagging strategy in production?

IntermediateProductionProject Structure and Design
Answer

Use a small, documented vocabulary of tags tied to purpose (packages, config, users, certs, deploy), applied on role import level so one tag selects a whole layer, plus always for essential setup and never for dangerous tasks.

Do not use tags as your main control flow, because partial runs skip dependencies and leave hosts half-configured. We run full playbooks in CI and use tags for fast, targeted runs, like --tags certs for rotating certificates. Always --list-tasks --tags x before a risky tagged run.

All Ansible questions Roadmap: Ansible

More on Project Structure and Design