New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fabric 2 - Execute a task on a Group (with arguments) #1691
Comments
I think this is the closest thing to a Fabric 2 tutorial: http://docs.fabfile.org/en/stable/getting_started.html |
Not knowing your exact use case, and noting that Group isn't super well fleshed out yet (focus has been on getting Connection in good shape), I'll point out that so far, Group has been conceived as a convenience/wrapper API only - it's the common case of "I give you a list of hostnames and a thing to do and you do it for me, without me having to write my own loop." For anything more complex, the idea is it should still be quite easy to do it yourself using manually-instantiated Connections within whatever Python construct fits your use case (iterating, etc.) So in this case, you'd have a 'meta' task performing something like (That still leaves pyinvoke/invoke#170, or less likely, #4, but for now both of those are work-aroundable.) If you supply details about the use case, maybe one of us can elaborate further. Re: tutorial: yea the 'getting started' page is the tutorial, the specific bit that pretends to know about Group.execute is http://docs.fabfile.org/en/v2/getting_started.html#bringing-it-all-together - but as above, the behavior isn't really thought out yet! |
Thank you so much for this v2 tutorial. I had found the source of it on GitHub but neglected to read around it.
I've already written the code that I needed when I posted this using the Fabric3 port, but with a mind towards moving to v2 once it's on PyPi. Thanks for your time guys! Edit: It might help future potential users if you added a link to that v2 tutorial into the README here. I'd pull request it but that seems like a bit much for a one line change :p |
Can't the |
This feature is greatly needed for Fabric2. Any idea when it will be merged? |
I've got a task that has arguments. I'd like to run this task on a group of hosts, with a different argument to the task depending on the host, from within another Python script.
The comment within
execute
says to implement it as per the tutorial. Can I get a link to this tutorial? And if I get it working /get it working with arguments being passed through, would this be a welcome pull request?The text was updated successfully, but these errors were encountered: