how to use python to execute commands on many serv

2019-07-18 01:59发布

问题:

everyone! I have an admin task: I need to write a script to execute commands given in a file on a list of servers whose ip address, login name and password is given in another file. My goal is to execute a command on every server concurrently, that is I don't want to wait until a server finish its command before I ask another server to execute the command. Anyone know how to do it? Thanks!

回答1:

Fabric could be your answer. I am using it for my current project.