4 ms·
Ansible let's you elevate to sudo when SSHing in as a non-root account. You can do this for on a play-by-play basis or for all plays.
by AlphaWeaver 6y ago
Ansible let's you elevate to sudo when SSHing in as a non-root account. You can do this for on a play-by-play basis or for all plays.
- wcchandler 6y agoDoes it prompt you for your password during the run or do you have nopasswd set in sudoers?
- frenchtoastto 6y agoThe password for sudo can be passed at run time using a flag or in your variables file.
- 3np 6y agoIf you use `become`, you can use an otherwise non-privileged account with sudo rights. When executed with the --ask-become-pass, ansible will interactively prompt you for your sudo password before commencing. If you feel manually filling in the sudo password every time is cumbersome, you could also integrate it with a yubikey or make it fetch your sudo password automatically via e.g. GNU pass.
- klodolph 6y agoThis doesn’t work with rsync actions, naturally.