inventory2sshconfig: typo (#211)

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#211
Co-authored-by: mg <mg@noreply.git.mgrote.net>
Co-committed-by: mg <mg@noreply.git.mgrote.net>
This commit is contained in:
Michael Grote 2021-10-08 10:49:40 +02:00
parent 8f80c2855f
commit edc60f173f

View file

@ -12,7 +12,7 @@ else
var_conf="/home/mg/.ssh/config"
fi
# loesche *.grote.lan Hosts und lege ein backup der Datei an
sed -i.bak -r '/[a-z0-9-]+.grote.lan/ d' $var_inf
sed -i.bak -r '/[a-z0-9-]+.grote.lan/ d' $var_inv
# gebe Host aus Inventorie aus, entferne die erste Zeile, schreibe "Host"
# https://superuser.com/questions/246837/how-do-i-add-text-to-the-beginning-of-a-file-in-bash
echo "$(ansible all -i $var_inv1 --list-hosts | grep -v hosts | sed -e 's/^/Host /g' | cat - $var_conf)" > $var_conf
echo "$(ansible all -i $var_inv --list-hosts | grep -v hosts | sed -e 's/^/Host /g' | cat - $var_conf)" > $var_conf