Hi all,
I have a newbie question.
We want to build Ansible playbook in a reusable fashion by leveraging the Ansible Galaxy concept.
Common functionalities playbooks will be used be be included as a role. They spread across several repos in github.
Each application will also have a separate playbook in its own repo. Inside the playbook for an app, we have roles/requirements.yml point to the common functionality playbooks via github url.
Both Apps and common functionality repos get updated.
Each app has a DEV, QA, and PROD environment.
What would be a good branching strategy / tools for app deployment such that we can safely deploy them in each environment without losing track of what combination was deployed at the same time.
Here is a hypotheticaly scenerio.
App1 is deployed into DEV, QA and PROD environment. Each of the env has different versions of the rpole dependencies. Do we first make App1 three branches (DEV, QA, PROD) and then within each branch allow the specific to diverge? Should master be same as PROD?
Having one branch per enviroment allows great isolation fo changes but also makes App1 code merging a much tedious process since we have to repeat the merging process for each additional environment added).
Can anyone share your experience on how Ansible playbook codes (with external referenced roles) should be organized and what are some of the branching strategies used ?
Thank you.
App1 (DEV):
App1 Logic
roles/requirements.yml: