You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think that it's possible to use contexts with groups right now. For the moment, my workaround is to just loop through my hosts and create a connection for each one.
Naturally, this isn't the best solution. It's a bit messy, verbose, and doesn't really work if you need a ThreadingGroup.
I face this issue, Contexts not working at Groups. The work-around I used is concatenate the cd with my command inside a /bin/bash -c ... line (in order to make the special chars like && been not escaped from the sudo): conn_group.sudo(f'/bin/bash -c "cd {working_path} && find {working_path} -name \'*.pyc\' -delete"', user=user)
I reckon a problem is that current latest doc make you think that Context work on Groups: As with Connection, Group objects may be used as context managers, which will automatically close the object on block exit. as you can read at https://docs.fabfile.org/en/stable/api/group.html
c.cwd shows correct directory but group.run doesn't show that path. How do I get around this?
The text was updated successfully, but these errors were encountered: