f500/ansible-project_deploy — pull request #2 by juriansluiman (2014-05-01 11:57:21+00:00)
Title: Checkout latest tag from git if project_version == "latest"

For production purpose it is very useful to automatically checkout
the latest available tag. You can specify the tag each time, but it
is error prone and a very simple command will fetch the latest tag.

This cannot be performed outside your role, because the git repository
must exist before the tag can be retrieved. If the strategy is not
set to "git" or the version not to "master", all tasks are skipped.

I am not sure how you think about this feature. The "problem" now is
ansible doesn't print the information during deployment, so you have
no idea what version will be deployed. I can add a debug task which
will be executed when project_latest is defined and prints out
`project_latest_tag.stdout`.

If this feature makes no sense to you, I can make an additional role
which checks out the git repo already so the git task in project_deploy
is just the same as the task now named "Checkout latest tag"