Pass env variables to sudo env

When building undercloud image, we rely on copied env variables and
default configuration of sudoers.d. By default, sudo is not allowed
to keep env variables like proxies.
To bypass this problem, pass all environment variables with sudo.

Change-Id: Ice90916bbf9a3a7b468f4e68cd783f445c806cfc
This commit is contained in:
Dariusz Smigiel (dasm) 2015-05-22 08:36:44 +02:00
parent 1ac88a978b
commit 3cef337bfd

View File

@ -5,5 +5,5 @@ set -eux
# Install repo file for Delorean el7 midstream packages built from
# rdo-management.
export DELOREAN_TRUNK_MGT_REPO=${DELOREAN_TRUNK_MGT_REPO:-"http://trunk-mgt.rdoproject.org/centos-kilo/current-passed-ci"}
sudo curl -o /etc/yum.repos.d/delorean-rdo-management.repo $DELOREAN_TRUNK_MGT_REPO/delorean-rdo-management.repo
sudo -E curl -o /etc/yum.repos.d/delorean-rdo-management.repo $DELOREAN_TRUNK_MGT_REPO/delorean-rdo-management.repo