aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-23 17:50:43 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-23 17:50:43 -0300
commitbf7a498215cbb6336b88ae075f46b9b65ed5cc9f (patch)
tree69996ee16668b20d68d33dff3e9b1bb32a9c503e /share
parentd46e962a910b93fdc86de0dd2c1087e67e6a91f1 (diff)
downloadhydra-bf7a498215cbb6336b88ae075f46b9b65ed5cc9f.tar.gz
hydra-bf7a498215cbb6336b88ae075f46b9b65ed5cc9f.tar.bz2
Deploy: test for borg key
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/deploy9
1 files changed, 6 insertions, 3 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy
index 2b914d3..9736c1d 100755
--- a/share/hydra/deploy
+++ b/share/hydra/deploy
@@ -89,7 +89,8 @@ for node in $NODES; do
tee $HYDRA_FOLDER/puppet/logs/$FQDN.`date +%Y%m%d%H%M`.log
# Check if keys should be imported
- if ! $SUDO test -f $FOLDER/root/.ssh/id_rsa; then
+ #if ! $SUDO test -f $FOLDER/root/.ssh/id_rsa; then
+ if ! $SUDO test -f $FOLDER/root/.borg/hydra/key; then
echo "No $FOLDER/root/.ssh/id_rsa found. Please import it and other keys when the system is online using import-keys action"
fi
elif [ "$node" == "localhost" ] || [ "$node" == "`facter fqdn`" ] || [ "$node" == "`facter hostname`" ]; then
@@ -128,7 +129,8 @@ for node in $NODES; do
$SUDO chown -R `whoami`. $HYDRA_FOLDER/puppet/ssl
# Import keys if needed
- if ! $SUDO test -f /root/.ssh/id_rsa; then
+ #if ! $SUDO test -f /root/.ssh/id_rsa; then
+ if ! $SUDO test -f /root/.borg/hydra/key; then
hydra $HYDRA import-keys localhost
fi
else
@@ -211,7 +213,8 @@ EOF
tee $HYDRA_FOLDER/puppet/logs/$FQDN.`date +%Y%m%d%H%M`.log
# Import keys if needed
- if ! $HYDRA_CONNECT $FQDN sudo test -f /root/.ssh/id_rsa; then
+ #if ! $HYDRA_CONNECT $FQDN sudo test -f /root/.ssh/id_rsa; then
+ if ! $HYDRA_CONNECT $FQDN sudo test -f /root/.borg/hydra/key; then
hydra $HYDRA import-keys localhost
fi
fi