Hands-on task
Set up passwordless sudo for deploy
The CI user deploy needs to restart the service without an interactive password, but full root cannot be given to it. Via sudoers, allow the deploy user to run only /usr/bin/systemctl restart app (and nothing else) without a password.
- sudo
- sudoers.d
- visudo
- principle of least privilege
- NOPASSWD