aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-04-08 19:02:12 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-04-08 19:02:12 -0300
commit298bdbf39b7658f09b3e9ce56cb5249088d0a34a (patch)
treef673dfa402f03e49524281e16adb5bcb5231ea33
parent5f27d94bef796725c0bdc66578972905450630d9 (diff)
downloadhydra-298bdbf39b7658f09b3e9ce56cb5249088d0a34a.tar.gz
hydra-298bdbf39b7658f09b3e9ce56cb5249088d0a34a.tar.bz2
Use keys/ssh instead of modules/site_keys
-rw-r--r--lib/hydra/config2
-rwxr-xr-xshare/hydra/newkeys4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/hydra/config b/lib/hydra/config
index fe7606e..d1eb411 100644
--- a/lib/hydra/config
+++ b/lib/hydra/config
@@ -50,7 +50,7 @@ function hydra_check_preferences {
# Set basic variables
PUPPET="$HYDRA_FOLDER/puppet"
- PUPPET_KEYS="$PUPPET/modules/site_keys/files"
+ PUPPET_KEYS="$PUPPET/keys"
export HYDRA_CONNECT="ssh -T -o ConnectTimeout=15"
}
diff --git a/share/hydra/newkeys b/share/hydra/newkeys
index 35dce4f..152416e 100755
--- a/share/hydra/newkeys
+++ b/share/hydra/newkeys
@@ -21,7 +21,7 @@ function hydra_newkeys {
# GPG keys should be manually imported in the nodes
for host in `hydra $HYDRA nodes`; do
node="`echo $host | cut -d . -f 1`"
- privkey="$PUPPET_KEYS/"$node"_id_rsa"
+ privkey="$PUPPET_KEYS/ssh/$node/"$node"_id_rsa"
pubkey="$privkey.pub"
if [ "$1" == "all" ]; then
hydra_genpairs
@@ -58,7 +58,7 @@ function hydra_genpairs {
hydra_unset_tmpfile $TMPWORK
# Add key into puppet git repository.
- ( cd $PUPPET_KEYS && git add $(basename $privkey) $(basename $pubkey) )
+ ( cd $PUPPET_KEYS/ssh/$node && git add $(basename $privkey) $(basename $pubkey) )
}
# Load.