Unverified Commit d422b045 by Feanil Patel Committed by GitHub

Merge pull request #3929 from proversity-org/proversity/NVN-update-script-extra-vars

ENH: extra vars to update.sh
parents 8e3c57a1 2424eaba
...@@ -10,12 +10,16 @@ IFS="," ...@@ -10,12 +10,16 @@ IFS=","
Usage: $PROG <repo> <version> Usage: $PROG <repo> <version>
-v add verbosity to edx_ansible run -v add verbosity to edx_ansible run
-e add extra_vars to ansible plays
-h this -h this
<repo> - must be one of edx-platform, edx-workers, xqueue, cs_comments_service, credentials, xserver, configuration, <repo> - must be one of edx-platform, edx-workers, xqueue, cs_comments_service, credentials, xserver, configuration,
read-only-certificate-code, edx-analytics-data-api, edx-ora2, insights, ecommerce, course_discovery, read-only-certificate-code, edx-analytics-data-api, edx-ora2, insights, ecommerce, course_discovery,
notifier, video_web_frontend, video_delivery_worker, veda_pipeline_worker, video_encode_worker, veda_ffmpeg notifier, video_web_frontend, video_delivery_worker, veda_pipeline_worker, video_encode_worker, veda_ffmpeg
<version> - can be a commit or tag <version> - can be a commit or tag
<extra_vars> - specify extra_vars to any of the ansible plays with the -e switch and then ecaptulating your vars in "duoble quotes"
example: update <repo> <version> -e "-e 'hallo=bye' -e 'bye=hallo'"
you can also specify a file as -e "-e '@/path/to/file.yml'"
EO EO
IFS=$SAVE_IFS IFS=$SAVE_IFS
...@@ -44,6 +48,12 @@ fi ...@@ -44,6 +48,12 @@ fi
extra_args="$extra_args -e 'disable_edx_services=true' -e devstack=true" extra_args="$extra_args -e 'disable_edx_services=true' -e devstack=true"
{% endif %} {% endif %}
if [[ "$3" == "-e" ]]; then
opt=$4
sed -e 's/^"//' -e 's/"$//' <<<"$opt"
extra_args="$extra_args $opt"
fi
declare -A repos_to_cmd declare -A repos_to_cmd
edx_ansible_cmd="{{ edx_ansible_venv_bin }}/ansible-playbook -i localhost, -c local $extra_args" edx_ansible_cmd="{{ edx_ansible_venv_bin }}/ansible-playbook -i localhost, -c local $extra_args"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment