Created
April 25, 2016 14:53
-
-
Save JohnPreston/f027bb2ed193f4a6c975bb90c7d8cefa to your computer and use it in GitHub Desktop.
Duplicate host_vars from an original file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Duplicate a valida source file and changes the IP address following the IP pattern | |
for server in {56..86}; do | |
IP=`echo $server + 30 | bc` | |
echo "server $server will have IP $IP" | |
rm -rfv ustlsaime0$server | |
cp ustlsaime055 ustlsaime0$server | |
sed -i "s/85/$IP/g" ustlsaime0$server | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment