-
Notifications
You must be signed in to change notification settings - Fork 138
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
use_sudo should support :as => user syntax #103
Comments
Were there installers other than runner you were using it with? I like it as an option for runner, but I'm not sure I like wrapping all the commands in a sub-shell... I'd like to see commands.map instead of commands.join... I spent a lot of effort on really nice error handling and it works best when commands can be executed one at a time by the actor - so if one raises an error we know where the error was raised - unless you know another solution to that problem. |
I second Josh's opinion on having :as_user as an option for runner. However, it's not the only case. Now, I find myself in a case where I need to build applications using customised installers as a different user (let's say: prey). Also, I need to transfer some files (let's say: redis.conf) as root and then chmod/chown to redis:redis on Ubuntu and install rbenv (ok, that is a runner) under the deploy account. Those all in a single installation script. Would be much simpler if we could just tell the line to do it for me. That's only an idea, BTW. Regards! |
Doesn't su require a password from STDIN if you aren't root already? Or is that configurable? Tell the line how? Some pseudo-code or a pseudo-package might be helpful to see. |
Honestly I think we'd want to hook this into our sudo framework, so it works everywhere sudo works now (actor, package, installer).
Then sudo_cmd in coordination with the actors sudo_command would have to build out the proper command... one last caveat is that right now even if sudo is true installers can decide they don't need to do anything special, so they just don't call sudo_cmd... :as though seems like we'd want it to always force a sudo... so some additional logic is needed to make that happen. |
To continue discussion at #85
An option in general or only for
runner
to run commands as a specific user.The text was updated successfully, but these errors were encountered: