aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/hydra/deploy8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/hydra/deploy b/lib/hydra/deploy
index 320b557..196b944 100644
--- a/lib/hydra/deploy
+++ b/lib/hydra/deploy
@@ -128,12 +128,20 @@ function hydra_deploy_copy_keys {
# Ensure key availability
hydra $HYDRA eyaml $FQDN
+ # Test for multi-keys setup
if [ -e "$HYDRA_FOLDER/puppet/keys/$FQDN/eyaml/private_key.pkcs7.pem" ]; then
hydra_deploy_copy $location $HYDRA_FOLDER/puppet/keys/$FQDN/eyaml/private_key.pkcs7.pem $DEPLOY_DEST/etc/puppet/keys/private_key.pkcs7.pem
+ # Then try single-key setup
+ elif [ -e "$HYDRA_FOLDER/puppet/keys/private_key.pkcs7.pem" ]; then
+ hydra_deploy_copy $location $HYDRA_FOLDER/puppet/keys/private_key.pkcs7.pem $DEPLOY_DEST/etc/puppet/keys/private_key.pkcs7.pem
fi
+ # Test for multi-keys setup
if [ -e "$HYDRA_FOLDER/puppet/keys/$FQDN/eyaml/public_key.pkcs7.pem" ]; then
hydra_deploy_copy $location $HYDRA_FOLDER/puppet/keys/$FQDN/eyaml/public_key.pkcs7.pem $DEPLOY_DEST/etc/puppet/keys/public_key.pkcs7.pem
+ # Then try single-key setup
+ elif [ -e "$HYDRA_FOLDER/puppet/keys/public_key.pkcs7.pem" ]; then
+ hydra_deploy_copy $location $HYDRA_FOLDER/puppet/keys/public_key.pkcs7.pem $DEPLOY_DEST/etc/puppet/keys/public_key.pkcs7.pem
fi
}