- init: version control in the superproject?
- metrics and alarms subsystem.
-- compile: sshkey.
- deploy:
- lockfile.
- fqdn match via local config lookup.
echo "# Do not edit this file. Use 'hydra $HYDRA compile' instead." >> $CONFIG
echo "#" >> $CONFIG
-# Process stuff for each node
+# Per-node configuration
for node in $NODES; do
# SSH public keys
if [ -e "$KEYS/$node/ssh/id_rsa.pub.asc" ]; then
echo "$key: '$value'" >> $CONFIG
fi
done
+
+echo "Compiling stuff from collected facts..."
+
+# SSH known_hosts
+echo "sshkeys:" >> $CONFIG
+
+for node in $NODES; do
+ if [ -e "$FACTS/${node}.yaml" ]; then
+ value="$(grep sshrsakey: $FACTS/${node}.yaml | cut -d '"' -f 2)"
+
+ echo " $node:" >> $CONFIG
+ echo " ensure: 'present'" >> $CONFIG
+ echo " type : 'ssh-rsa'" >> $CONFIG
+ echo " key : '$value'" >> $CONFIG
+ fi
+done