Hello folks,

I set up my deployment flow in such a way that Ansible clones a git repo 
locally (generally named "myrepo-deploy" and never modified by hand), 
cleans and syncs it as master, builds the contents and deploys them to 
either dev, production or pre-production depending on which hosts file I 
choose for ansible-playbook.

The challenge is that sometimes I need to deploy from a modified copy of 
the above repo where development work is happening. e.g. instead of using 
clean myrepo-deploy against preproduction, I'd like to use myrepo (with 
some uncommitted modifications in it) against preproduction just for 
testing purposes.

So I'd love to be able to be able to pass a switch to ansible-playbooks and 
say "use the development version of the repo just this one time".

   - I know there's an option with when: and using environment variables
   - I know I could also create a separate hosts file that's something like 
   "preprod-dev", but now I have to make one of these for each of my host 
   files and it adds an extra burden of variable maintenance in 2x files.

Is there perhaps a better practice that you could recommend for this kind 
of situation?

Thank you in advance!

-- 
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/836e7f75-7ed3-440b-871a-d567453d6ea6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to