fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] Sticking more stuff into env from the commandline


From: Simon KP
Subject: Re: [Fab-user] Sticking more stuff into env from the commandline
Date: Wed, 5 Oct 2011 23:00:16 +1100

You could set env variables from passing an argument to fabric function from command line, 

$ fab sometask:foo,baz,keyword=kwbar

sometask(first, second, keyword='')
    env.first = first
    env.second = second
    env.keywork = keyword

On Wed, Oct 5, 2011 at 10:36 PM, Oivvio Polite <address@hidden> wrote:
I'd like to use env to store some more options provided on the command
line so that for instance

$ fabric --foo bar sometask

would give result  in sometask being run with  env.foo == "bar"

or even

$ fabric --extraenvs foo:bar,baz:qux sometask

would  result  in sometask being run with  env.foo == "bar" and
env.bar == "qux"

Is there anyway of doing something along those lines with the way that
fabric works a the moment or would that have to be added?

oivvio

--
http://liberationtech.net

_______________________________________________
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]