fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] fab "let" command


From: allan bailey
Subject: Re: [Fab-user] fab "let" command
Date: Thu, 15 Oct 2009 11:49:56 -0700



On Thu, Oct 15, 2009 at 8:56 AM, Christian Vest Hansen <address@hidden> wrote:
On Thu, Oct 15, 2009 at 4:24 PM, Jeff Forcier <address@hidden> wrote:
> Yea, I'm fine with adding another CLI flag for setting env vars. Would
> rather avoid a "fake task", though, in favor of something like e.g.

I can see how not having fake tasks keeps things tidy.

>
>    $ fab --env "foo=bar,biz=baz"



Isn't there a way to create "hidden" tasks?

I've kept hidden tasks by prefixing with _.

Example:

 
def _xm_svclist(svc):
    import os
    fh = os.popen('xm.listsvc.py %s' % svc)
    return [i.strip() for i in fh]

def svc(svc=None, *args, **kwargs):
    'util func to lookup the svc host list'
    env.hosts = _xm_svclist(svc)


-allan


reply via email to

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