Le 21/03/2016 12:30, poiuytrez a écrit :
> 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? 


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
--
{ :github => "@leucos", :twitter => "@b9m", :gpg => "0X24B35C22" }

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/56EFDD7A.3080600%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to