aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-06-23 16:31:58 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-06-23 16:31:58 -0300
commitfcaae5e00d76407e806a14e9b19ec148ea6d506c (patch)
tree7daa170c97975c02b2fd86d4ad1103c816bcb9f2
parent0509c1d1221231e6c796021e673281765d6cd90c (diff)
downloadhydra-fcaae5e00d76407e806a14e9b19ec148ea6d506c.tar.gz
hydra-fcaae5e00d76407e806a14e9b19ec148ea6d506c.tar.bz2
Compile: config
-rwxr-xr-xshare/hydra/compile8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/hydra/compile b/share/hydra/compile
index f5f79ad..eb76f7d 100755
--- a/share/hydra/compile
+++ b/share/hydra/compile
@@ -20,11 +20,11 @@
source $APP_BASE/lib/hydra/functions || exit 1
hydra_config_load
-# Global configuration
+# Config
CONFIG="$HYDRA_FOLDER/puppet/config/compiled.yaml"
-
-# Nodes
NODES="`hydra $HYDRA nodes`"
+FACTS="$HYDRA_FOLDER/puppet/config/facts"
+KEYS="$HYDRA_FOLDER/keyring/keys/nodes"
echo "Starting a fresh compiled config..."
mkdir -p "`dirname $CONFIG`"
@@ -37,7 +37,7 @@ echo "#" >> $CONFIG
# Process stuff for each node
for node in $NODES; do
# SSH public keys
- if [ -e "$HYDRA_FOLDER/keyring/keys/nodes/$node/ssh/id_rsa.pub.asc" ]; then
+ if [ -e "$KEYS/$node/ssh/id_rsa.pub.asc" ]; then
echo "Adding SSH public key for $node..."
key="compiled::ssh::key::$node"
value="$(keyringer $HYDRA decrypt nodes/$node/ssh/id_rsa.pub 2> /dev/null | cut -d ' ' -f 2)"