News for hackers. Stuff that matters.
Re:Getting Started with Ansible by AlphaWeaver on Tuesday November 17, 2020 @08:20AM (#25123395)
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.
Re:Getting Started with Ansible by wcchandler on Tuesday November 17, 2020 @08:43AM (#25123612)
Does it prompt you for your password during the run or do you have nopasswd set in sudoers?
Re:Getting Started with Ansible by 3np on Tuesday November 17, 2020 @09:08AM (#25123864)
If 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.

Re:Getting Started with Ansible by frenchtoastto on Tuesday November 17, 2020 @08:56AM (#25123742)
The password for sudo can be passed at run time using a flag or in your variables file.
Re:Getting Started with Ansible by klodolph on Tuesday November 17, 2020 @09:08AM (#25123862)
This doesn’t work with rsync actions, naturally.