Skip to content

Instantly share code, notes, and snippets.

@astail
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astail/88e0f43e4cee438639dd to your computer and use it in GitHub Desktop.
Save astail/88e0f43e4cee438639dd to your computer and use it in GitHub Desktop.
#!/bin/sh
i=1
end=15
ip="192.168.0."
svrstr=astel
end=`expr $end + 1`
while [ $i -lt $end ]; do
if [ $i -lt 10 ]; then
svr="${svrstr}0${i}"
else
svr="$svrstr$i"
fi
echo "[$svr]"
echo "$ip$i ansible_ssh_private_key_file=keys/id_rsa"
if [ $i -le $end ]; then
i=`expr $i + 1`
fi
done
echo end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment