summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-05-12 12:00:01 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-05-12 12:00:01 -0300
commit26b9c978cbae93a5a083c40eb3c53567a5c7a292 (patch)
tree19f0af01b4c101e1d4f011fdc3fcc3d243dc5542 /lib
parentecab72cd456e7c526a0ce2ef902187d61a7279ee (diff)
downloadhydra-26b9c978cbae93a5a083c40eb3c53567a5c7a292.tar.gz
hydra-26b9c978cbae93a5a083c40eb3c53567a5c7a292.tar.bz2
Deploy: copy hiera-eyaml keys
Diffstat (limited to 'lib')
-rw-r--r--lib/hydra/deploy19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/hydra/deploy b/lib/hydra/deploy
index 26c28d0..4c6d967 100644
--- a/lib/hydra/deploy
+++ b/lib/hydra/deploy
@@ -110,6 +110,25 @@ function hydra_deploy_mkdirs {
$DEPLOY_COMMAND chmod -R 640 /etc/puppet
}
+# Copy keys
+function hydra_deploy_copy_keys {
+ local location="$1"
+
+ if [ -z "$location" ]; then
+ location="remote"
+ fi
+
+ $DEPLOY_COMMAND mkdir -p $FOLDER/etc/puppet/keys
+
+ if [ -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
+
+ if [ -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
+}
+
# Copy config secrets
function hydra_deploy_copy_secrets {
local location="$1"