Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
echo "Building "$YPROX_PR
# build the new PR
cd /var/www/gh_hook/scripts
# Tower server needs variable to launch the playbook. We provide them inside a yml file.
if [[ $DB_RESET ]]; then
sed -e "s;%YPROX_PR%;$YPROX_PR;g" -e "s;%YPROX_DB_RESET%;true;g" extra_vars.yml > extra_vars_$YPROX_PR.yml
sed -e "s;%YPROX_PR%;$YPROX_PR;g" -e "s;%YPROX_DB_RESET%;false;g" extra_vars.yml > extra_vars_$YPROX_PR.yml
# Tells tower to launches the deploy playbook with extra vars containted in the file created before
tower-cli job launch --job-template 18 --extra-vars extra_vars_$YPROX_PR.yml
# If you don't have a tower server, you can simply launch a playbook with ansible
# ansible-playbook -i inventory-prod yproximite_pr.yml -utristanbes -K -eyprox_pr=$YPROX_PR -edb_reset=$DB_RESET
rm extra_vars_$YPROX_PR.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.