TLS everywhere: Only generate ssh key if it's not there

The TLS everywhere gate is broken since zuul now generates the ssh key,
so the generation command fails. This makes it optional.

Change-Id: I19cec9f8cf0e4f369e09747d6949a10fcb5aea26
This commit is contained in:
Juan Antonio Osorio Robles 2017-10-23 09:47:22 +03:00
parent 0534dd598e
commit 50aa92c0b9
1 changed files with 3 additions and 1 deletions

View File

@ -393,7 +393,9 @@ set -m
if [ "$DEPLOY_OVB_EXTRA_NODE" = '1' ]; then
# This is usually done in the undercloud install, but we need it at this
# point since we want access to the extra node
ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa
if [ ! -f ~/.ssh/id_rsa ]; then
ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa
fi
SSH_KEY="$(cat ~/.ssh/id_rsa.pub)"
TEST_ENV_EXTRA_ARGS=("--create-undercloud" "--ssh-key" "$SSH_KEY")
else