Hi,

I have this fabric python script.

#!/usr/bin/env python
from fabric.api import *
env.shell = '/bin/bash -l -c'
out_log = open("output.txt", "w")
with open("hosts.txt") as host_file:
        host_list = [x.strip() for x in host_file.readlines()]

@hosts(host_list)
def install():
        with settings(warn_only=True):
            version = run("route -n").stderr
        out_log.write("%s: %s" % (env.host, version))

when i run from the command line fab version, i get

kaushal@kaushal-laptop:~$ fab version

Fatal error: Command(s) not found:
    version

Aborting.
kaushal@kaushal-laptop:~$

Am i missing something ?

Thanks and Regards,

Kaushal

_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to