That really sounds like a job for ssh keys to me, just setting up key authentication will go a long way toward uncomplicating your ssh usage. I also wouldn't use the @hosts decorator if you're pulling in your host list dynamically. I always recommend using the execute() function if you intend to run fabric tasks directly from Python code.
On Fri, Apr 15, 2016 at 6:05 AM santosh kumar <[email protected]> wrote: > Hi all, > > I want to understand if the fabric has the facility to work on multiple > users and passwords . > For say, i have a requirement where i read the names of the hosts and ips > from a file, later redirect it to the @hosts decorator. > > The challenge for me that the hosts can be logged in via some passwords. > like > > combination 1: > username:root , password:xyz > combination 2: > username:root, password:abc > combination 3: > username:ubuntu,password:ubuntu > > so if one combination does not work i want my "fab" to try another > combination. is this possible ? > Do we have a option for this ? > > Other details > Fabric==1.10.2 > > Thanks, > Tuxfux > > _______________________________________________ > Fab-user mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/fab-user >
_______________________________________________ Fab-user mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/fab-user
