I need to execute an application in parallel on multiple Ubuntu servers while supplying different arguments for different servers. I tried to google it, but could not get to the possible solution. I even experimented with ssh/pdsh/parallel, but without success.
To explain the scenario further, here is a non-working example (with
script.sh should be executed on all 3 servers in parallel but with different arguments. FYI, I already have public/private ssh-key (password-free login) in place.
pdsh -w server1,server2,server3 -l username script.sh args
args should be 1 for server1, 2 for server2 etc.
I would appreciate if someone can help me achieve this, either using
pdsh or some other tool available in Ubuntu.