diff options
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydra/compile | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/share/hydra/compile b/share/hydra/compile index 1dd7b07..7fdf195 100755 --- a/share/hydra/compile +++ b/share/hydra/compile @@ -51,7 +51,12 @@ echo " ssh:" >> $CONFIG echo " keys:" >> $CONFIG for node in $NODES; do - echo "... for $node" - key="$(keyringer $HYDRA decrypt nodes/$node/ssh/id_rsa.pub 2> /dev/null)" - echo " $node: '$key'" >> $CONFIG + # Hiera doesn't accept keys with dots + key="`echo $node | sed -e 's/\./_/g'`" + + if [ -e "$HYDRA_FOLDER/keyring/keys/nodes/$node/ssh/id_rsa.pub.asc" ]; then + echo "... for $node" + value="$(keyringer $HYDRA decrypt nodes/$node/ssh/id_rsa.pub 2> /dev/null)" + echo " $key: '$value'" >> $CONFIG + fi done |