-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Group class lacking sudo method #1999
Comments
I see in the source code (in the Group classes) that sudo() is planned, but not yet implemented. Same for local(). As far as I know we are also missing the context managers cd() and prefix(), I do not suppose those work with Groups. I also see that Connection is a subclass of Invoke's Context, but Group isn't -- this is a weird decision, probably coming from the fact that Group needs to collect results from multiple computers. Maybe the design of Fabric 2 should have been just a little different. Personally I would have tried separating sets of commands (e. g. ["apt update", "apt upgrade"] is a set of 2 commands] from where they run (Local, Remote, Group) and then requiring these 2 separate things at the end to run any one command: run(command_set, where=a_group_of_servers, parallel=True) Just thinking out loud. |
Working on this now. Works pretty well in practice. Will be releasing under Fabric 2.6 today hopefully. It "wants" another ticket I can't find right now that is for supporting per-host config data (eg so you can say host1 has sudo password A, and host2 has sudo password B). But in the interim, |
Fabric 1 contained the ability to run code as root in parallel. My organization has a collection of scripts that run commands on remote hosts in parallel and as sudo. ThreadingGroup has the parallelism we need, and Connection has the sudo method, but there isn't a class that has both.
This seems like a major problem with Fabric 2, but I haven't found anyone else discussing this issue. Is there a common workaround? Are there plans to create this functionality soon? Any feedback is appreciated.
The text was updated successfully, but these errors were encountered: