Merge "Redirect "apt-get install -y" stdin to /dev/null"

This commit is contained in:
Jenkins 2015-10-09 17:34:45 +00:00 committed by Gerrit Code Review
commit d16ed92a75
3 changed files with 9 additions and 6 deletions

View File

@ -76,7 +76,7 @@ if [ ! "$(grep -e '^nameserver 8.8.8.8' -e '^nameserver 8.8.4.4' /etc/resolv.con
fi
# Ensure that the https apt transport is available before doing anything else
apt-get update && apt-get install -y apt-transport-https
apt-get update && apt-get install -y apt-transport-https < /dev/null
# Set the host repositories to only use the same ones, always, for the sake of consistency.
cat > /etc/apt/sources.list <<EOF
@ -94,7 +94,7 @@ EOF
apt-get update
# Remove known conflicting packages in the base image
apt-get purge -y libmysqlclient18 mysql-common
apt-get purge -y libmysqlclient18 mysql-common < /dev/null
# Install required packages
apt-get install -y bridge-utils \
@ -110,7 +110,7 @@ apt-get install -y bridge-utils \
tmux \
vim \
vlan \
xfsprogs
xfsprogs < /dev/null
# Flush all the iptables rules set by openstack-infra
if [ "${FLUSH_IPTABLES}" == "yes" ]; then
@ -295,7 +295,7 @@ done
if [ ${DEPLOY_CEILOMETER} == "yes" ]; then
# Install mongodb on the aio1 host
apt-get install mongodb-server mongodb-clients python-pymongo -y
apt-get install mongodb-server mongodb-clients python-pymongo -y < /dev/null
# Change bind_ip to management ip
sed -i "s/^bind_ip.*/bind_ip = $MONGO_HOST/" /etc/mongodb.conf
# Asserting smallfiles key

View File

@ -44,7 +44,7 @@ ssh_key_create
APT=`command -v apt-get` || true
YUM=`command -v yum` || true
if [[ "$APT" != "" ]]; then
apt-get update && apt-get -y install git python-all python-dev curl autoconf g++ python2.7-dev
apt-get update && apt-get -y install git python-all python-dev curl autoconf g++ python2.7-dev < /dev/null
elif [[ "$YUM" != "" ]]; then
yum check-update && yum -y install git python2 curl autoconf gcc-c++ python2-devel
fi

View File

@ -29,7 +29,10 @@ export WORKING_FOLDER=${WORKING_FOLDER:-"/opt/openstack-ansible"}
set -x
# install git so that we can fetch the repo
apt-get update && apt-get install -y git
# note: the redirect of stdin to /dev/null is necessary for when this script is
# run as part of a curl-pipe-shell. otherwise apt-get will consume the rest of
# this file as if it was its own stdin (despite using -y to skip interaction).
apt-get update && apt-get install -y git < /dev/null
# fetch the repo
git clone -b ${REPO_BRANCH} ${REPO_URL} ${WORKING_FOLDER}