]> gitweb.fluxo.info Git - hydra.git/commitdiff
Compile: config
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 23 Jun 2016 19:31:58 +0000 (16:31 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 23 Jun 2016 19:31:58 +0000 (16:31 -0300)
share/hydra/compile

index f5f79ad61b3369ccc31debb67364ab76e68d39b3..eb76f7d807c3fadb3d56ee2bf838150d5a6d5eb0 100755 (executable)
 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)"