diff --git a/runrole b/runrole index 4d060c719..6d076b1be 100755 --- a/runrole +++ b/runrole @@ -2,8 +2,9 @@ INVENTORY="ansible_hosts" PLAYBOOK="run-one-role.yml" -#PLAYBOOK="iiab-stages.yml" +ARGS="" CWD=`pwd` + if [ $# -eq 2 ]; then export ANSIBLE_LOG_PATH="$2" else @@ -22,10 +23,14 @@ if [ ! -f /etc/iiab/config_vars.yml ]; then echo "{}" > /etc/iiab/config_vars.yml fi +if [ "$2" == "--reinstall" ]; then + ARGS="$ARGS --extra-vars reinstall=True" +fi + if [[ $# -eq 0 ]] ; then echo " usage: ./runrole " echo " Can only take a single value." exit 0 fi -ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local -e "role_to_run=$1" +ansible-playbook -i $INVENTORY $PLAYBOOK ${ARGS} --connection=local -e "role_to_run=$1"