Hi, if you’re setting user and password, this should be super easy
from fabric.api import env env.disable_known_hosts = True If you are using fabric as a library, would be a good idea to have a setup function or module, where you can set all relevant settings together. Regards 2016-12-13 14:51 GMT+01:00 Prasant J <[email protected]>: Thanks Carlos for the response! > > > I'm using fabric as library in my program. > I'm setting up environment first (env.user, env.password) and then > using run() to execute the command. > > How can I set "disable-known-hosts" in this case? (I know how to use > from command line) > > Could you please point me to an example or provide some inputs so that > I can use this feature? > > Regards, Pj > > On Mon, Dec 12, 2016 at 2:46 PM, Carlos García > <[email protected]> wrote: > > Hi, > > > > you can try to set disable_known_hosts to True. You can set it in the > CLI or > > using the env configuration dictionary. > > > > fab --disable-known-hosts your-task -H your-host > > > > You can check the docs here > > [http://docs.fabfile.org/en/1.12/usage/fab.html#cmdoption-D] > > > > Regards > > > > 2016-12-05 7:06 GMT+01:00 Prasant J <[email protected]>: > >> > >> Hi, > >> > >> I'm making a python GUI program that uses fabric and performs > >> operations on the remote device. I'm new to python as well as fabric. > >> My python program is al most complete. > >> > >> > >> My Query: > >> When the remote host identification has changed, fabric throws > >> Exception: NetworkError. Is there a way by which I can ask fabric to > >> bypass remote host identification check? > >> > >> Any inputs will be of help to me. > >> > >> > >> Regards, Pj > >> > >> _______________________________________________ > >> 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
