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.
More on Project Structure and Design
What does a production Ansible repository look like?BeginnerMonorepo or separate repos for roles? How do you decide?IntermediateHow do you structure inventories for dev, stage and prod?BeginnerHow do you prevent someone from running a playbook against production by accident?IntermediateWhat does "thin playbooks, fat roles" mean?IntermediateWhat makes a well-designed role?Intermediate