Last active
November 16, 2016 03:58
-
-
Save RVIRUS0817/4241a32fdaad7246ed5b1b43ebc56f03 to your computer and use it in GitHub Desktop.
shell script
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
# /bin/sh | |
SERVERDIR=/home/adachin/work/server/http-conf | |
REPODIR=/home/adachin/work/server/httpd-conf | |
HTTPDIR=/etc/httpd/conf/local | |
#各サーバに飛ばす | |
for x in `seq 1 20`; do | |
echo "server$x" | |
scp $REPODIR/httpd.conf adachin@server$x:$SERVERDIR | |
ssh -t adachin@server$x sudo cp -r $SERVERDIR/httpd.conf $HTTPDIR | |
done | |
#apacheのconfを各サーバに送り自動化。ansibleやるまでもないからシェルスクリプトで。 | |
→結局ansibleの方がいいね |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment