summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/hydra/deploy10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/hydra/deploy b/lib/hydra/deploy
index ed41d08..2cff22b 100644
--- a/lib/hydra/deploy
+++ b/lib/hydra/deploy
@@ -58,6 +58,13 @@ function hydra_deploy_setup {
FQDN="`cat /etc/hostname`"
PUPPET_OPTS="--confdir=$HYDRA_FOLDER/puppet --modulepath=$HYDRA_FOLDER/puppet/modules"
hydra_deploy_set_manifest $HYDRA_FOLDER
+
+ # Fix eyaml keys
+ mkdir -p $HYDRA_FOLDER/puppet/keys
+ rm -f $HYDRA_FOLDER/puppet/keys/private_key.pkcs7.pem
+ rm -f $HYDRA_FOLDER/puppet/keys/public_key.pkcs7.pem
+ ln -sf $HYDRA_FOLDER/puppet/keys/$FQDN/eyaml/private_key.pkcs7.pem $HYDRA_FOLDER/puppet/keys/private_key.pkcs7.pem
+ ln -sf $HYDRA_FOLDER/puppet/keys/$FQDN/eyaml/public_key.pkcs7.pem $HYDRA_FOLDER/puppet/keys/public_key.pkcs7.pem
fi
# Common parameters
@@ -118,7 +125,8 @@ function hydra_deploy_copy_keys {
location="remote"
fi
- $DEPLOY_COMMAND mkdir -p $FOLDER/etc/puppet/keys
+ # Ensure key availability
+ hydra $HYDRA eyaml $FQDN
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