Hello,
We are a team of 10 people. Our ansible playbooks are hosted on a git repository. It happens that someone deploys an outdated version of a playbook on machine because he forgot to do a git pull before deploying. Do you have a strategy to avoid this issue?
Thank you for your help,
poiuytrez
Hi Guillaume,
I see two quick solutions:
- have people login to a bastion host which serves as a deployment
machine (may be some 'git checkout && git pull' trick in .bashrc)
- use tags, deploy a "version" file and do a "remote_tag |
version_compare(current_tag, '>=')"; this woould involve some local
tricks to get the latest tag (e.g. git describe --always --tag | cut -f
1 -d'-').
However the latter is really workflow dependent, and requires some
discipline setting tags (and thus might just move the problem elsewhere
instead of fixing it).
M
Thank you Michel for your suggestions.