How to run as sudo without being prompted for sudo pass? #4244
Unanswered
devjk1
asked this question in
Help needed
Replies: 1 comment
|
The prompt you're hitting is real sudo, not Deployer — you can see it in the output, Deployer is already going through For unattended deploys the usual answer is to stop sending a password at all and give the deploy user a narrow NOPASSWD rule instead. On the server: chmod 0440 /etc/sudoers.d/deployer
visudo -c # check you haven't locked yourself out before logging offKeep the command list explicit rather than Two things that will bite you afterwards:
run('sudo cp {{release_or_current_path}}/horizon.conf /etc/supervisor/conf.d/horizon.conf');Once the sudoers rule is in, you can drop |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have some working code that I need to run as sudo, but would like to skip the password prompt that comes with running these tasks. How can I skip the password prompt?
Even though the command runs most of the time, sometimes if I wait too long I get this error.
If I add
set('remote_user', get('provision_user'));to the tasks, I get this error.Any help is appreciated and thank you for your time.
All reactions