fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Not having much luck with your initial examples.


From: Nick Timkovich
Subject: Re: [Fab-user] Not having much luck with your initial examples.
Date: Thu, 22 Nov 2018 21:04:55 -0600

For the `fab` tool to pick up functions in your fabfile module/package as tasks, you need to decorate them with address@hidden decorator (specifically fabric.task). See http://docs.fabfile.org/en/2.4/getting-started.html#addendum-the-fab-command-line-tool  What documentation are you following? It sounds fairly incomplete and could be fixed.

Nick

On Thu, Nov 22, 2018 at 2:06 PM Bob Gustafson <address@hidden> wrote:
I am running on a Mac air with Mojave os 10.14.1.

I installed python with homebrew

Also using virtualenv and the folder fabric-test

cd fabric-test

air:fabric-test bobgus$ ls
env     fabfile.py

air:fabric-test bobgus$ source env/bin/activate

(env) air:fabric-test bobgus$ which python
/Users/bobgus/fabric-test/env/bin/python

(env) air:fabric-test bobgus$ python -V
Python 3.7.0

(env) air:fabric-test bobgus$ fab -V
Fabric 2.4.0
Paramiko 2.4.2
Invoke 1.2.0

(env) air:fabric-test bobgus$ cat fabfile.py
#!/usr/bin/env python

def welcome():
   print("Welcome to fabric running on python 3")

def uptime():
   run("uptime")fab

--------------------- testing -------

(env) air:fabric-test bobgus$ fab uptime
No idea what 'uptime' is!

(env air:fabric-test bobgus$ fab welcome
No idea what 'welcome' is!

--------------------------------------

I must be doing something wrong here..


_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user

reply via email to

[Prev in Thread] Current Thread [Next in Thread]