I use GitFlow workflow, and will often want to deploy a feature branch to a remote stage server, and not the default branch that is in my environment’s wordpress_sites.yml.
My way of doing this has been to modify the environment’s wordpress_sites.yml before running the deploy playbook, to set the branch value each time, and then running
ansible-playbook deploy.yml -e "site=mysite.com env=staging"
Is there a way to specify the branch to deploy from the command line as an argument, without changing the file each time? Is some argument like
-e "site=mysite.com env=staging branch=feature/myfeature" possible?
I looked but couldn’t find anything. My method is working, but not ideal.