(fix) Add -E for sudo to pick user env

In 10_buid_scrip.sh script sudo call needs user's environment
variables for proxy configuration, in case it is run behind a
proxy.

Change-Id: Ia084cba548e19340d25ef941e96336d9e420bec0
This commit is contained in:
Ahmad Mahmoudi 2020-10-21 14:56:14 +00:00
parent 19360953b0
commit ff6b5ecbff

View File

@ -23,6 +23,6 @@ TMP_DIR=${TMP_DIR:-"$(dirname $(mktemp -u))"}
ANSIBLE_HOSTS=${ANSIBLE_HOSTS:-"${TMP_DIR}/ansible_hosts"} ANSIBLE_HOSTS=${ANSIBLE_HOSTS:-"${TMP_DIR}/ansible_hosts"}
PLAYBOOK_CONFIG=${PLAYBOOK_CONFIG:-"${TMP_DIR}/config.yaml"} PLAYBOOK_CONFIG=${PLAYBOOK_CONFIG:-"${TMP_DIR}/config.yaml"}
sudo ansible-playbook -i "$ANSIBLE_HOSTS" \ sudo -E ansible-playbook -i "$ANSIBLE_HOSTS" \
playbooks/airship-airshipctl-build-gate.yaml \ playbooks/airship-airshipctl-build-gate.yaml \
-e @"$PLAYBOOK_CONFIG" -e @"$PLAYBOOK_CONFIG"