????fabric
????title????????????????????????????????……?? task*3 ???? salary * 3 (o(????)o)
?????????????????????????????????????????е????????????????????????????????
???????bug?????????????汾??(2????)??ssh?????????pull????2???????rsync?????????A??B??C??D??E??1??????????ssh??ABCDE????????????????(8-10????) = 13-15????
??????????????????β??????????????????????????????????????????????????????????????????????ssh?????????????д??????????????????У??????????????н??
???????????????fabric???
????????
?????????????
?????????????????????????????????????????????
???????Щ????????????????????????python…..
????????????????
?????????shell???????????????????????????????????????????
????????????
??????????????????????????????????У?
????sudo easy_install fabric
????????1.6?汾????????pip install????????
??????????????????????
????[ken@~$] which fab
????/usr/local/bin/fab
??????????????????1?????
????????????????
????hello world
????????б?????????????????????????????????????
??????????py???: fabfile.py
????def hello():
????print("Hello world!")
????????????У?
????[ken@~/tmp/fab$] fab hello
????Hello world!
????Done.
?????????????????fabfile????????????????????????????
[ken@~/tmp/fab$] mv fabfile.py test.py
fabfile.py -> test.py
[ken@~/tmp/fab$] fab hello
Fatal error: Couldn't find any fabfiles!
Remember that -f can be used to specify fabfile path?? and use -h for help.
Aborting.
[ken@~/tmp/fab$] fab -f test.py hello
Hello world!
Done.
????????????
???????fabfile.py?????
????def hello(name?? value):
????print("%s = %s!" % (name?? value))
???????
[ken@~/tmp/fab$] fab hello:name=age??value=20
age = 20!
Done.
[ken@~/tmp/fab$] fab hello:age??20
age = 20!
Done.