Versioning

Hello. We are new to ansible; so far so great. My question is more process related than ansible usage directly.

How are people versioning ansible via source control? What I ask is best described with an example:

- application foo in a git repository is now deployed using ansible
- good config management says treat config as code so ansible playbooks will be version controlled also
- so we need to know which version of the configuration code deployed which version of application foo

So, do ansible playbooks live in the same repo with the application code it deploys, or in a centralized repo? If the latter, how do you version the two together for reproducibility and good config management?

We are leaning to a single ansible repository where configs for our many applications reside. This makes reusability easier (shared tasks, global vars, etc), but version management harder. We are considering releasing our ansible repo as an application; ex. application foo @v1.0.0 depends on v2.1.0 of our ansible config application.

I realize this isn't specifically an ansible issue (as it would be the same for chef, fabric, etc), but if you're using ansible, then you're smarter than other folks and better able to offer best practices (buttering up for kinder replies).

Thank you for any insight.

Keeping one repo for your configuration management is a pretty
standard approach, and even branching with app versions is not a bad
idea.

Not too many people would keep their app code in the same repo but
you'd probably be the best judge of whether you wanted to do that.