X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=tools%2Fvirt_ci_rampup.sh;h=aaf162cf71c6127aaf58cfbcefd37e2c1f62202f;hb=07903e4f058b1e8661149260afa5d2b4d3dacb69;hp=210e6ed401d19ca5492e5a1b37c4218139764edb;hpb=810f91e242a5d1a562712df72a9ec95605ed1bab;p=yardstick.git diff --git a/tools/virt_ci_rampup.sh b/tools/virt_ci_rampup.sh index 210e6ed40..aaf162cf7 100755 --- a/tools/virt_ci_rampup.sh +++ b/tools/virt_ci_rampup.sh @@ -13,9 +13,33 @@ # See the License for the specific language governing permissions and # limitations under the License. +env_http_proxy=$(sed -ne "s/^http_proxy=[\"\']\(.*\)[\"\']/\1/p" /etc/environment) +if [[ -z ${http_proxy} ]] && [[ ! -z ${env_http_proxy} ]]; then + export http_proxy=${env_http_proxy} +fi +env_https_proxy=$(sed -ne "s/^https_proxy=[\"\']\(.*\)[\"\']/\1/p" /etc/environment) +if [[ -z ${https_proxy} ]] && [[ ! -z ${env_https_proxy} ]]; then + export https_proxy=${env_https_proxy} +fi +env_ftp_proxy=$(sed -ne "s/^ftp_proxy=[\"\']\(.*\)[\"\']/\1/p" /etc/environment) +if [[ -z ${ftp_proxy} ]] && [[ ! -z ${env_ftp_proxy} ]]; then + export ftp_proxy=${env_ftp_proxy} +fi +if [[ ! -z ${http_proxy} ]] || [[ ! -z ${https_proxy} ]]; then + export no_proxy="${no_proxy}" + extra_args="${extra_args} -e @/tmp/proxy.yml " + cat < /tmp/proxy.yml +--- +proxy_env: + http_proxy: ${http_proxy} + https_proxy: ${https_proxy} + ftp_proxy: ${ftp_proxy} + no_proxy: ${no_proxy} +EOF +fi ANSIBLE_SCRIPTS="${0%/*}/../ansible" -cd ${ANSIBLE_SCRIPTS} &&\ -ansible-playbook \ - -e rs_file='../etc/infra/infra_deploy.yaml' \ +cd ${ANSIBLE_SCRIPTS} && \ +sudo -EH ansible-playbook \ + -e RS_FILE='../etc/infra/infra_deploy_two.yaml' -e CLEAN_UP=False ${extra_args} \ -i inventory.ini infra_deploy.yml