diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-05-12 19:06:40 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-05-12 19:06:40 -0300 |
commit | c39581b7054cfd755c63ed1803d31134196009d8 (patch) | |
tree | 1b969513fcfcac3ded9f1c3ddd8a4e25641a4685 | |
parent | bfc074501871806b0e1938f5f152482ba51d4879 (diff) | |
download | hydra-c39581b7054cfd755c63ed1803d31134196009d8.tar.gz hydra-c39581b7054cfd755c63ed1803d31134196009d8.tar.bz2 |
Ensure eyaml key availability
-rw-r--r-- | lib/hydra/deploy | 10 | ||||
-rwxr-xr-x | share/hydra/deploy | 3 |
2 files changed, 12 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 diff --git a/share/hydra/deploy b/share/hydra/deploy index 1307802..f8dbb08 100755 --- a/share/hydra/deploy +++ b/share/hydra/deploy @@ -80,6 +80,9 @@ for node in $NODES; do # Setup deploy environment hydra_deploy_setup + # Ensure key availability + hydra $HYDRA eyaml $FQDN + # Check if puppet is installed if [ ! -e "/usr/bin/puppet" ]; then $SUDO apt-get update |